Skip to content

Commit 803f7bb

Browse files
Fix tier 2 and 3 deployment
1 parent aa30c3c commit 803f7bb

2 files changed

Lines changed: 21 additions & 19 deletions

File tree

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
name: Publish Tier 2
22

33
on:
4-
workflow_dispatch:
5-
inputs:
6-
version:
7-
description: 'Version to publish (e.g., 0.11.0-beta)'
8-
required: true
9-
type: string
4+
push:
5+
tags:
6+
- 'Release-Tier2/[0-9]+.[0-9]+.[0-9]+*'
107

118
permissions:
129
contents: read
@@ -17,14 +14,18 @@ jobs:
1714
runs-on: ubuntu-latest
1815
environment: pub.dev-tier2
1916
steps:
17+
- name: Extract version
18+
id: version
19+
run: echo "VERSION=${GITHUB_REF#refs/tags/Release-Tier2/}" >> $GITHUB_OUTPUT
20+
2021
- uses: actions/checkout@v4
2122
with:
2223
fetch-depth: 0
2324

2425
- name: Checkout release branch
2526
run: |
26-
git fetch origin "release/${{ inputs.version }}"
27-
git checkout "release/${{ inputs.version }}"
27+
git fetch origin "release/${{ steps.version.outputs.VERSION }}"
28+
git checkout "release/${{ steps.version.outputs.VERSION }}"
2829
2930
- uses: ./.github/actions/setup
3031
with:
@@ -33,4 +34,4 @@ jobs:
3334
- name: Publish packages
3435
run: |
3536
chmod +x .github/scripts/publish-packages.sh
36-
.github/scripts/publish-packages.sh "${{ inputs.version }}" reflux dart_node_express dart_node_ws dart_node_better_sqlite3 dart_node_mcp
37+
.github/scripts/publish-packages.sh "${{ steps.version.outputs.VERSION }}" reflux dart_node_express dart_node_ws dart_node_better_sqlite3 dart_node_mcp
Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
name: Publish Tier 3
22

33
on:
4-
workflow_dispatch:
5-
inputs:
6-
version:
7-
description: 'Version to publish (e.g., 0.11.0-beta)'
8-
required: true
9-
type: string
4+
push:
5+
tags:
6+
- 'Release-Tier3/[0-9]+.[0-9]+.[0-9]+*'
107

118
permissions:
129
contents: write
@@ -17,15 +14,19 @@ jobs:
1714
runs-on: ubuntu-latest
1815
environment: pub.dev-tier3
1916
steps:
17+
- name: Extract version
18+
id: version
19+
run: echo "VERSION=${GITHUB_REF#refs/tags/Release-Tier3/}" >> $GITHUB_OUTPUT
20+
2021
- uses: actions/checkout@v4
2122
with:
2223
fetch-depth: 0
2324
token: ${{ secrets.GITHUB_TOKEN }}
2425

2526
- name: Checkout release branch
2627
run: |
27-
git fetch origin "release/${{ inputs.version }}"
28-
git checkout "release/${{ inputs.version }}"
28+
git fetch origin "release/${{ steps.version.outputs.VERSION }}"
29+
git checkout "release/${{ steps.version.outputs.VERSION }}"
2930
3031
- uses: ./.github/actions/setup
3132
with:
@@ -34,7 +35,7 @@ jobs:
3435
- name: Publish packages
3536
run: |
3637
chmod +x .github/scripts/publish-packages.sh
37-
.github/scripts/publish-packages.sh "${{ inputs.version }}" dart_node_react dart_node_react_native
38+
.github/scripts/publish-packages.sh "${{ steps.version.outputs.VERSION }}" dart_node_react dart_node_react_native
3839
3940
- name: Switch dependencies to local
4041
run: dart run tools/switch_deps.dart local
@@ -48,5 +49,5 @@ jobs:
4849
echo "No changes to commit"
4950
else
5051
git commit -m "chore: switch to local dependencies after publish"
51-
git push origin release/${{ inputs.version }}
52+
git push origin release/${{ steps.version.outputs.VERSION }}
5253
fi

0 commit comments

Comments
 (0)