feat: initial release of get-github-token action #1
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: write | |
| jobs: | |
| release-please: | |
| name: Release Please | |
| runs-on: ubuntu-latest | |
| outputs: | |
| release_created: ${{ steps.release.outputs.release_created }} | |
| tag_name: ${{ steps.release.outputs.tag_name }} | |
| major: ${{ steps.release.outputs.major }} | |
| minor: ${{ steps.release.outputs.minor }} | |
| steps: | |
| - name: Release Please | |
| id: release | |
| uses: googleapis/release-please-action@v4 | |
| with: | |
| release-type: node | |
| update-tags: | |
| name: Update Major/Minor Tags | |
| needs: release-please | |
| if: needs.release-please.outputs.release_created == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Update version tags | |
| run: | | |
| git config user.name github-actions[bot] | |
| git config user.email github-actions[bot]@users.noreply.github.com | |
| MAJOR="v${{ needs.release-please.outputs.major }}" | |
| MINOR="v${{ needs.release-please.outputs.major }}.${{ needs.release-please.outputs.minor }}" | |
| git tag -fa $MAJOR -m "Update $MAJOR tag" | |
| git push origin $MAJOR --force | |
| git tag -fa $MINOR -m "Update $MINOR tag" | |
| git push origin $MINOR --force | |
| echo "Updated tags: $MAJOR, $MINOR" | |
| echo "Users can now use: flxbl-io/get-github-token@$MAJOR" |