feat: update graasp ui dependency (#606) #224
This file contains 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
# Automate releases of new app versions | |
name: Release new app version | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release-please: | |
runs-on: ubuntu-latest | |
outputs: | |
tag_name: ${{ steps.release.outputs.tag_name }} | |
steps: | |
- uses: google-github-actions/release-please-action@v4 | |
id: release | |
with: | |
release-type: node | |
- 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 == 'true' }} | |
id: set-tag | |
run: | | |
REPOSITORY=$(echo '${{ github.repository }}') | |
TAG=$(echo '${{ steps.release.outputs.tag_name }}') | |
JSON=$(jq -c --null-input --arg repository "$REPOSITORY" --arg tag "$TAG" '{"repository": $repository, "tag": $tag}') | |
echo "json=$JSON" >> $GITHUB_OUTPUT | |
# 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 == 'true' }} | |
uses: peter-evans/repository-dispatch@v3 | |
with: | |
token: ${{ secrets.REPO_ACCESS_TOKEN }} | |
repository: graasp/graasp-deploy | |
event-type: update-staging-version | |
client-payload: ${{steps.set-tag.outputs.json}} | |
- name: Auto Tag | |
uses: graasp/graasp-deploy/.github/actions/auto-tag-after-release@v1 | |
with: | |
releases_created: ${{ steps.release.outputs.releases_created }} | |
tag_name: ${{ steps.release.outputs.tag_name }} | |
sentry-release: | |
if: needs.release-please.result == 'success' && needs.release-please.outputs.tag_name != '' | |
needs: release-please | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: yarn install, build | |
run: yarn && yarn build | |
- name: Create Sentry release | |
uses: getsentry/action-release@v1 | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | |
SENTRY_PROJECT: graasp-library | |
with: | |
environment: production | |
sourcemaps: './build' | |
version: ${{ needs.release-please.outputs.tag_name }} |