This repository has been archived by the owner on May 29, 2023. It is now read-only.
fix(release): error of building dist files (#18) #45
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: | |
push: | |
branches: | |
- main | |
# pull_request: | |
# types: [closed] | |
# branches: | |
# - main | |
jobs: | |
build: | |
# if: ${{ github.event.pull_request.merged }} | |
name: Build and Release | |
runs-on: ubuntu-latest | |
permissions: | |
actions: write | |
packages: write | |
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 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.6.x' | |
- name: Install dependencies | |
run: npm ci | |
- name: Build | |
run: npm run build | |
- name: Run semantic-release | |
env: | |
GH_TOKEN: ${{ secrets.ACTION_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
GH_USER: ${{env.GH_USER}} | |
GH_EMAIL: ${{env.GH_EMAIL}} | |
run: npx semantic-release |