Skip to content

Commit

Permalink
fix: udpate release-please condition
Browse files Browse the repository at this point in the history
  • Loading branch information
spaenleh committed Dec 11, 2023
1 parent c441f9c commit 0ad24f0
Showing 1 changed file with 6 additions and 17 deletions.
23 changes: 6 additions & 17 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,27 @@
# Automate releases of new app versions
name: release-please
name: Release new app version

on:
push:
branches:
- main
- master

jobs:
release-please:
runs-on: ubuntu-latest
outputs:
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
- uses: google-github-actions/release-please-action@v3
- uses: google-github-actions/release-please-action@v4
id: release
with:
release-type: node
package-name: graasp-library
changelog-types: '[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"docs","section":"Documentation","hidden":false},{"type":"test","section":"Tests","hidden":false}]'

- uses: actions/checkout@v3

# creates minor and major tags that follow the latest release
- name: Tag major and minor versions
uses: jacobsvante/tag-major-minor-action@v0.1
if: ${{ steps.release.outputs.releases_created }}
with:
major: ${{ steps.release.outputs.major }}
minor: ${{ steps.release.outputs.minor }}
- uses: actions/checkout@v4

# put created tag in an env variable to be sent to the dispatch
- name: Set tag
if: ${{ steps.release.outputs.releases_created }}
if: ${{ steps.release.outputs.releases_created == "true" }}
id: set-tag
run: |
REPOSITORY=$(echo '${{ github.repository }}')
Expand All @@ -42,7 +31,7 @@ jobs:
# Trigger an 'on: repository_dispatch' workflow to run in graasp-deploy repository
- name: Push tag to Graasp Deploy (Staging)
if: ${{ steps.release.outputs.releases_created }}
if: ${{ steps.release.outputs.releases_created == "true" }}
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
Expand All @@ -57,7 +46,7 @@ jobs:
tag_name: ${{ steps.release.outputs.tag_name }}

sentry-release:
if: needs.release-please.result == 'success'
if: needs.release-please.result == 'success' && needs.release-please.outputs.tag_name != ''
needs: release-please
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 0ad24f0

Please sign in to comment.