Skip to content

Commit

Permalink
ci: trigger release workflow on draft creation
Browse files Browse the repository at this point in the history
  • Loading branch information
AuHau committed Jul 6, 2022
1 parent 66036af commit 6da7feb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/release.yml → .github/workflows/assets.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: Release
name: Assets build
on:
release:
types: [released]
# The `release: create` event (nor-any other release type events) are not triggered for release draft creation
# which is needed to have all the assets build when the release goes out.
# We hence uses `repository_dispatch` from the `release.yaml` workflow when release is created by the release-please mechanism.
repository_dispatch:
types: [assets-build]

jobs:
publish-macos-m1:
Expand Down Expand Up @@ -148,4 +151,4 @@ jobs:
ignore_missing: true
ignore_empty: true
sourcemaps: ./dist/desktop/src
version: ${{ github.ref }}
version: ${{ github.event.client_payload.version }}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# On each new commit to master, create/update a PR with release
# automatically bumps version and creates changelog as per conventional commits
name: Release Github
name: Release

on:
push:
Expand All @@ -18,3 +18,10 @@ jobs:
release-type: node
package-name: bee-desktop
draft: true
- name: Trigger assets builds on release
if: steps.release.outputs.release_created == 'true'
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.GHA_PAT_BASIC }}
event-type: assets-build
client-payload: '{ "version": ${{ steps.release.outputs.version }}}'

0 comments on commit 6da7feb

Please sign in to comment.