Skip to content

Commit 4bdbbe7

Browse files
ci: use env.VERSION
Signed-off-by: Thomas Poignant <thomas.poignant@gofeatureflag.org>
1 parent d923b26 commit 4bdbbe7

File tree

1 file changed

+24
-16
lines changed

1 file changed

+24
-16
lines changed

.github/workflows/release.yml

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@ name: Release
22
on:
33
workflow_call:
44
inputs:
5-
version: { type: string, required: true }
6-
secrets:
7-
DOCKER_USERNAME: { required: true }
8-
DOCKER_PASSWORD: { required: true }
9-
PERSONAL_GITHUB_TOKEN: { required: true }
5+
version:
6+
type: string
7+
required: true
8+
secrets:
9+
DOCKER_USERNAME:
10+
required: true
11+
DOCKER_PASSWORD:
12+
required: true
13+
PERSONAL_GITHUB_TOKEN:
14+
required: true
1015

1116
permissions:
1217
contents: read
@@ -49,6 +54,9 @@ jobs:
4954
env:
5055
VERSION: ${{ inputs.version }}
5156
steps:
57+
- name: Echo Release wasm version
58+
run: |
59+
echo "Release wasm version: ${{ env.VERSION }}"
5260
- name: Checkout
5361
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
5462
with:
@@ -61,14 +69,14 @@ jobs:
6169
- uses: acifani/setup-tinygo@db56321a62b9a67922bb9ac8f9d085e218807bb3 # v2.0.1
6270
with:
6371
tinygo-version: "0.37.0"
64-
- run: ./.github/ci-scripts/release_wasm.sh ${VERSION}
72+
- run: ./.github/ci-scripts/release_wasm.sh ${{ env.VERSION }}
6573
- name: Upload assets
6674
uses: softprops/action-gh-release@6da8fa9354ddfdc4aeace5fc48d7f679b5214090 # v2.4.1
6775
if: github.ref_type == 'tag'
6876
with:
6977
files: |
70-
./out/release-wasm/gofeatureflag-evaluation_${VERSION}.wasi
71-
./out/release-wasm/gofeatureflag-evaluation_${VERSION}.wasm
78+
./out/release-wasm/gofeatureflag-evaluation_${{ env.VERSION }}.wasi
79+
./out/release-wasm/gofeatureflag-evaluation_${{ env.VERSION }}.wasm
7280
7381
- name: Checkout wasm-releases repository
7482
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -80,21 +88,21 @@ jobs:
8088
- name: Copy WASM files to wasm-releases repository
8189
run: |
8290
mkdir -p wasm-releases/evaluation
83-
cp ./out/release-wasm/gofeatureflag-evaluation_${VERSION}.wasi wasm-releases/evaluation/
84-
cp ./out/release-wasm/gofeatureflag-evaluation_${VERSION}.wasm wasm-releases/evaluation/
91+
cp ./out/release-wasm/gofeatureflag-evaluation_${{ env.VERSION }}.wasi wasm-releases/evaluation/
92+
cp ./out/release-wasm/gofeatureflag-evaluation_${{ env.VERSION }}.wasm wasm-releases/evaluation/
8593
8694
- name: Create Pull Request to wasm-releases
8795
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
8896
with:
89-
branch: publish-wasm-evaluation-${VERSION}
90-
title: "feat: Publish WASM files for ${VERSION}"
97+
branch: publish-wasm-evaluation-${{ env.VERSION }}
98+
title: "feat: Publish WASM files for ${{ env.VERSION}}"
9199
body: |
92-
Automated pull request to publish evaluation WASM files for release ${VERSION}
100+
Automated pull request to publish evaluation WASM files for release ${{ env.VERSION }}
93101
94102
This PR includes:
95-
- gofeatureflag-evaluation_${VERSION}.wasi
96-
- gofeatureflag-evaluation_${VERSION}.wasm
97-
commit-message: Publish evaluation WASM files for ${VERSION}
103+
- gofeatureflag-evaluation_${{ env.VERSION }}.wasi
104+
- gofeatureflag-evaluation_${{ env.VERSION }}.wasm
105+
commit-message: Publish evaluation WASM files for ${{ env.VERSION }}
98106
assignees: thomaspoignant
99107
draft: false
100108
signoff: true

0 commit comments

Comments
 (0)