ci: automate release process using semantic-release #3
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 | |
| - ci/RMET-3995/automate-releases | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # needed for semantic-release | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Install Semantic Release and plugins | |
| run: | | |
| npm install -g semantic-release \ | |
| @semantic-release/git \ | |
| @semantic-release/changelog \ | |
| @semantic-release/exec \ | |
| @semantic-release/github \ | |
| @semantic-release/commit-analyzer \ | |
| @semantic-release/release-notes-generator | |
| - name: Run Semantic Release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: semantic-release |