ci: fix the release flow through Trusted Publishing #275
This file contains hidden or 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 | |
| - develop | |
| permissions: | |
| id-token: write # Required for OIDC | |
| contents: read | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - uses: actions/setup-node@v4 | |
| with: | |
| cache: "yarn" | |
| node-version: "22" | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Install dependencies | |
| run: yarn | |
| - name: Build | |
| run: yarn build | |
| - name: Release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.VENUS_TOOLS_TOKEN }} | |
| GIT_AUTHOR_NAME: Venus Tools | |
| GIT_AUTHOR_EMAIL: [email protected] | |
| GIT_COMMITTER_NAME: Venus Tools | |
| GIT_COMMITTER_EMAIL: [email protected] | |
| run: yarn semantic-release |