-
Notifications
You must be signed in to change notification settings - Fork 165
69 lines (61 loc) · 2.07 KB
/
release.yml
File metadata and controls
69 lines (61 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: release
permissions:
contents: write
id-token: write # Required for OIDC (MCP and scaleway-cli-wasm)
on:
push:
tags:
- 'v*'
jobs:
goreleaser:
runs-on: "${{ vars.RUNS_ON || 'ubuntu-latest' }}"
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Login to DockerHub Registry
run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: stable
- name: Verify go.mod is tidy
run: |
go mod tidy
git diff --exit-code
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@1a80836c5c9d9e5755a25cb59ec6f45a3b5f41a8 # v7.2.1
with:
version: "${{ vars.GORELEASER_VERSION || '~> v2' }}"
args: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
wasm:
runs-on: "${{ vars.RUNS_ON || 'ubuntu-latest' }}"
needs:
- goreleaser
steps:
# Checkout should always be before setup-go to ensure caching is working
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 1
- name: Install Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: stable
- name: Install pnpm
uses: pnpm/action-setup@v5
with:
package_json_file: "wasm/package.json"
- name: Build
run: VERSION=${{ github.ref_name }} ./scripts/build-wasm.sh
- name: Configure package version
working-directory: wasm
run: pnpm version ${{ github.ref_name }}
- name: Publish package
working-directory: wasm
run: pnpm publish --no-git-checks