Upgrade to core 0.4.0 #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: publish-prerelease | |
on: | |
pull_request: | |
types: [closed] | |
branches: | |
- main | |
jobs: | |
publish-prerelease: | |
name: Pre-release - Publish | |
# Only run when merging branches that are not releases | |
if: > | |
(github.event.pull_request.merged == true) && | |
!startsWith(github.head_ref, 'release/') | |
runs-on: ubuntu-latest | |
steps: | |
# Cloning | |
- uses: actions/checkout@v3 | |
with: | |
# Use CI token that can override branch protection | |
token: ${{ secrets.SYNTEST_CI }} | |
fetch-depth: 0 | |
# Setup, Caching, and .npmrc file to publish to npm | |
- name: Use latest Node.js LTS version | |
uses: actions/setup-node@v3 | |
with: | |
node-version: lts/* | |
# NPM Cache using all package-lock files as hash | |
cache: 'npm' | |
cache-dependency-path: '**/package-lock.json' | |
# NPM Publishing settings | |
registry-url: 'https://registry.npmjs.org' | |
always-auth: true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }} | |
# Configure git user | |
- name: Config git user | |
run: | | |
git config --global user.name 'SynTest CI' | |
git config --global user.email 'info@syntest.org' | |
# Dependencies | |
- name: Solidity - Install Dependencies | |
run: npm ci | |
# Building | |
- name: Solidity - Build | |
run: npm run build | |
# Versioning | |
- name: "Solidity - Version" | |
env: | |
GH_TOKEN: ${{ secrets.SYNTEST_CI }} | |
run: | | |
npx lerna version --conventional-commits --conventional-prerelease --changelog-preset conventionalcommits --preid beta --no-changelog --yes --loglevel silly | |
# Publishing | |
- name: "Solidity - Publish" | |
env: | |
GH_TOKEN: ${{ secrets.SYNTEST_CI }} | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }} | |
run: npx lerna publish from-git --dist-tag beta --yes --loglevel silly |