Repository navigation
Merge pull request #118 from tgiachi/develop #115
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 ] | |
| permissions: | |
| contents: write | |
| pull-requests: read | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: mcr.microsoft.com/dotnet/sdk:10.0 | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v6 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: '22' | |
| - name: Install git | |
| run: | | |
| apt-get update | |
| apt-get install -y git | |
| - name: Configure git user | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
| - name: Configure authenticated remote for release push | |
| env: | |
| RELEASE_PAT: ${{ secrets.RELEASE_PAT }} | |
| run: | | |
| if [ -z "$RELEASE_PAT" ]; then | |
| echo "Missing required secret RELEASE_PAT"; exit 1 | |
| fi | |
| git -C "$GITHUB_WORKSPACE" remote set-url origin "https://x-access-token:${RELEASE_PAT}@github.com/${{ github.repository }}.git" | |
| - name: Run semantic-release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.RELEASE_PAT }} | |
| GH_TOKEN: ${{ secrets.RELEASE_PAT }} | |
| run: | | |
| # Versions pinned: unpinned npx resolves the latest of each package, and | |
| # conventional-changelog-conventionalcommits@10 requires conventional-changelog-writer@9, | |
| # while @semantic-release/release-notes-generator@14 loads writer@8 -> "Missing helper" | |
| # crash. Preset @9 matches the writer@8 that the semantic-release@24 plugins ship. | |
| npx -y \ | |
| -p semantic-release@24 \ | |
| -p @semantic-release/changelog \ | |
| -p @semantic-release/commit-analyzer \ | |
| -p @semantic-release/release-notes-generator \ | |
| -p @semantic-release/git \ | |
| -p @semantic-release/github \ | |
| -p @semantic-release/exec \ | |
| -p conventional-changelog-conventionalcommits@9 \ | |
| semantic-release |