Skip to content

Commit 68a9cb3

Browse files
authored
chore: simplify release workflow (#5654)
1 parent bd6f8b3 commit 68a9cb3

1 file changed

Lines changed: 16 additions & 26 deletions

File tree

.github/workflows/release.yml

Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ on:
99
- 'v*'
1010

1111
jobs:
12-
goreleaser:
12+
release:
13+
name: Release job for Scaleway-cli
1314
runs-on: "${{ vars.RUNS_ON || 'ubuntu-latest' }}"
1415
steps:
1516
- name: Checkout
@@ -33,37 +34,26 @@ jobs:
3334
go mod tidy
3435
git diff --exit-code
3536
36-
- name: Run GoReleaser
37-
uses: goreleaser/goreleaser-action@5daf1e915a5f0af01ddbcd89a43b8061ff4f1a89 # v7.2.2
38-
with:
39-
version: "${{ vars.GORELEASER_VERSION || '~> v2' }}"
40-
args: release
41-
env:
42-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43-
44-
wasm:
45-
runs-on: "${{ vars.RUNS_ON || 'ubuntu-latest' }}"
46-
needs:
47-
- goreleaser
48-
steps:
49-
# Checkout should always be before setup-go to ensure caching is working
50-
- name: Checkout
51-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
52-
with:
53-
fetch-depth: 1
54-
- name: Install Go
55-
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
56-
with:
57-
go-version: stable
58-
- name: Install pnpm
37+
- name: Install pnpm for wasm
5938
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
6039
with:
6140
package_json_file: "wasm/package.json"
62-
- name: Build
41+
42+
- name: Build WebAssembly version
6343
run: VERSION=${{ github.ref_name }} ./scripts/build-wasm.sh
64-
- name: Configure package version
44+
45+
- name: Configure WebAssembly package version
6546
working-directory: wasm
6647
run: pnpm version ${{ github.ref_name }}
48+
6749
- name: Publish package
6850
working-directory: wasm
6951
run: pnpm publish --no-git-checks
52+
53+
- name: Run GoReleaser
54+
uses: goreleaser/goreleaser-action@5daf1e915a5f0af01ddbcd89a43b8061ff4f1a89 # v7.2.2
55+
with:
56+
version: "${{ vars.GORELEASER_VERSION || '~> v2' }}"
57+
args: release
58+
env:
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)