Skip to content

Commit acf22e3

Browse files
committed
chore: gh action
1 parent 52f578f commit acf22e3

2 files changed

Lines changed: 15 additions & 14 deletions

File tree

.github/workflows/bump-version.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ jobs:
5353
git tag "${{ steps.bump.outputs.new_tag }}"
5454
git push origin "${{ steps.bump.outputs.new_tag }}"
5555
56-
- name: Trigger Release Workflow
57-
uses: peter-evans/workflow-dispatch@v4
56+
- name: Repository Dispatch
57+
uses: peter-evans/repository-dispatch@v4
5858
with:
59-
workflow: release.yml
6059
token: ${{ secrets.GH_PAT }}
61-
inputs: '{"tag": "${{ steps.bump.outputs.new_tag }}"}'
62-
# TODO: use peter-evans/workflow-dispatch@v1 to dispatch build workflow, passing the new version so that the build workflow can use it without re-clone the whole repo
60+
repository: PaperDebugger/paperdebugger
61+
event-type: release
62+
client-payload: '{"tag": "${{ steps.bump.outputs.new_tag }}"}'

.github/workflows/release.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,23 @@ on:
33
push:
44
tags:
55
- 'v*'
6-
workflow_dispatch:
7-
inputs:
8-
tag:
9-
description: 'Version tag'
10-
required: true
6+
repository_dispatch:
7+
types: [release]
8+
119
jobs:
1210
build-chrome-extension:
1311
runs-on: ubuntu-latest
1412
steps:
1513
- name: Checkout repository
1614
uses: actions/checkout@v4
15+
with:
16+
ref: ${{ github.event.client_payload.tag }}
17+
1718
- name: Setup env
1819
run: |
1920
echo "MONOREPO_REVISION=$(git rev-parse HEAD | cut -c1-6)" >> $GITHUB_ENV
20-
echo "BRANCH_NAME=${{ github.ref_name }}" >> $GITHUB_ENV
21-
echo "VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
21+
echo "BRANCH_NAME=${{ github.event.client_payload.tag }}" >> $GITHUB_ENV
22+
echo "VERSION=${{ github.event.client_payload.tag }}" >> $GITHUB_ENV
2223
- name: Setup node
2324
uses: actions/setup-node@v4
2425
with:
@@ -67,8 +68,8 @@ jobs:
6768
- name: Setup env
6869
run: |
6970
echo "MONOREPO_REVISION=$(git rev-parse HEAD | cut -c1-6)" >> $GITHUB_ENV
70-
echo "BRANCH_NAME=${{ github.ref_name }}" >> $GITHUB_ENV
71-
echo "VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
71+
echo "BRANCH_NAME=${{ github.event.client_payload.tag }}" >> $GITHUB_ENV
72+
echo "VERSION=${{ github.event.client_payload.tag }}" >> $GITHUB_ENV
7273
- name: Log in to the container registry
7374
uses: docker/login-action@v3
7475
with:

0 commit comments

Comments
 (0)