fix: the package version as the it didn't publish using semantic vers… #7
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 new version | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- '.github/ISSUE_TEMPLATE/**' | |
- '**.md' | |
workflow_dispatch: | |
jobs: | |
ci: | |
name: CI | |
uses: ./.github/workflows/ci.yaml | |
secrets: inherit | |
check-dist: | |
name: Check dist/ | |
uses: ./.github/workflows/check-dist.yaml | |
secrets: inherit | |
release: | |
environment: | |
name: github | |
needs: [ci, check-dist] | |
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 | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/create-github-app-token@v1 | |
id: github-app | |
with: | |
app-id: ${{ vars.TGHA_APP_ID }} | |
private-key: ${{ secrets.TGHA_PRIVATE_KEY }} | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ steps.github-app.outputs.token }} | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: npm | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install dependencies | |
run: npm ci --ignore-scripts | |
- name: Semantic Version | |
env: | |
GITHUB_TOKEN: ${{ steps.github-app.outputs.token }} | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: npx semantic-release |