feat(semantic-release): set up Semantic-Release for Auto Package Buil… #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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: NodeJS CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: "*" | |
permissions: | |
contents: read # for checkout | |
jobs: | |
# quality: | |
# runs-on: ${{ matrix.os }} | |
# strategy: | |
# matrix: | |
# node-version: [10.x, 12.x, 14.x, 15.x] | |
# os: [ubuntu-latest, windows-latest] | |
# # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
# steps: | |
# - uses: actions/checkout@v2 | |
# - name: Use Node.js ${{ matrix.node-version }} | |
# uses: actions/setup-node@v2 | |
# with: | |
# node-version: ${{ matrix.node-version }} | |
# - run: npm ci | |
# - run: npm test | |
release: | |
runs-on: ${{ matrix.os }} | |
if: ${{ github.ref == 'refs/heads/main' }} | |
# needs: [quality] | |
permissions: | |
contents: write # to be able to publish a GitHub release | |
issues: write # to be able to comment on released issues | |
pull-requests: write # to be able to comment on released pull requests | |
id-token: write # to enable use of OIDC for npm provenance | |
strategy: | |
matrix: | |
node-version: [18.x] | |
# os: [ubuntu-22.04, windows-latest] | |
os: [ubuntu-22.04] | |
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use NodeJS ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Installing Dependencies | |
run: npm ci | |
- name: Release | |
run: npm run semantic-release | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |