Skip to content

Commit

Permalink
feat: add release-please pipeline (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
seblum authored Jul 3, 2024
1 parent eb1d541 commit 9223019
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 3 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/build-and-push-on-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,37 @@ jobs:
file: ./poetry.Dockerfile
push: true
tags: ${{ env.DOCKERREPO }}:${{ matrix.tags }}

release:
name: 🚀 Release
runs-on: ubuntu-latest
needs:
- docker
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
steps:
-
uses: googleapis/release-please-action@v4
name: 📦 Release
id: release
with:
release-type: "python"
-
uses: actions/checkout@v4
-
name: 🏷️ Tag Major and Minor Versions
if: ${{ steps.release.outputs.release_created }}
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/google-github-actions/release-please-action.git"
git tag -d v${{ steps.release.outputs.major }} || true
git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
git push origin :v${{ steps.release.outputs.major }} || true
git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}"
git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}"
git push origin v${{ steps.release.outputs.major }}
git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}
4 changes: 1 addition & 3 deletions .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: Create release notes

on:
push:
tags:
- 'v*.*.*'
workflow_dispatch:

permissions:
contents: write
Expand Down

0 comments on commit 9223019

Please sign in to comment.