Release #30
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: Release | |
on: | |
workflow_run: | |
workflows: ['Snyk Security Check', 'Tests'] | |
branches: [main, master, beta] | |
types: | |
- completed | |
# on: | |
# push: | |
# branches: [main, master, beta] | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
# with: | |
# node-version: 'lts/*' | |
with: | |
node-version: 20.x | |
- name: Install dependencies | |
run: npx ci | |
# run: npm ci | |
- name: Install semantic-release extra plugins | |
run: npm install --save-dev @semantic-release/changelog @semantic-release/git | |
# - name: Lint | |
# run: npm run lint-fix | |
# Redundant cos tests workflow has already been run | |
# - name: Test | |
# run: npm run test:unit --if-present | |
- name: Build | |
run: npm run build | |
- name: Create .npmrc file | |
run: | | |
echo registry=https://registry.npmjs.org/ > .npmrc | |
echo @uzenith360:registry=https://npm.pkg.github.com/ > .npmrc | |
echo '//npm.pkg.github.com/:_authToken=${{ secrets.GH_TOKEN }}' >> .npmrc | |
- name: Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: npx semantic-release |