Skip to content

Commit e4830e0

Browse files
committed
ci: build plugins
- implement `get-versions` Signed-off-by: Yi Huang <[email protected]>
1 parent 13cda11 commit e4830e0

File tree

3 files changed

+31
-1
lines changed

3 files changed

+31
-1
lines changed

.github/workflows/build-on-linux.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
required: true
1010
version:
1111
type: string
12-
default: wip # TODO
12+
required: true
1313

1414
permissions: {}
1515

.github/workflows/build.yml

+5
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,15 @@ on:
88
permissions: {}
99

1010
jobs:
11+
get-versions:
12+
uses: ./.github/workflows/get-versions.yml
13+
1114
parse-plugins:
1215
uses: ./.github/workflows/parse-plugins.yml
1316

1417
linux:
1518
needs:
19+
- get-versions
1620
- parse-plugins
1721
strategy:
1822
fail-fast: false
@@ -24,4 +28,5 @@ jobs:
2428
uses: ./.github/workflows/build-on-linux.yml
2529
with:
2630
plugins: ${{ toJSON(matrix.plugins) }}
31+
version: ${{ needs.get-versions.outputs.version }}
2732
secrets: inherit

.github/workflows/get-versions.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Get versions
3+
4+
on:
5+
workflow_call:
6+
outputs:
7+
version:
8+
value: ${{ jobs.get-versions.outputs.version }}
9+
10+
jobs:
11+
get-versions:
12+
name: Retrieve version information
13+
runs-on: ubuntu-latest
14+
outputs:
15+
version: ${{ steps.parse.outputs.version }}
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
repository: 'WasmEdge/WasmEdge' # TODO: checkout plugins from this repository
21+
- id: parse
22+
run: |
23+
git fetch --tags --force
24+
VERSION=$(git describe --match '[0-9].[0-9]*' --tag)
25+
echo "version=${VERSION}" >> "${GITHUB_OUTPUT}"

0 commit comments

Comments
 (0)