Repository navigation
69 lines (57 loc) · 1.91 KB
/
Copy pathrelease.yml
File metadata and controls
69 lines (57 loc) · 1.91 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: Build and Release Plugin Assets
on:
push:
tags:
- "v*"
workflow_dispatch:
permissions:
contents: write
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.24"
- name: Setup TinyGo
run: |
set -euo pipefail
curl -sL -o /tmp/tinygo.deb https://github.com/tinygo-org/tinygo/releases/download/v0.41.1/tinygo_0.41.1_amd64.deb
sudo dpkg -i /tmp/tinygo.deb
- name: Build backend WASM
working-directory: backend
run: |
set -euo pipefail
mkdir -p ../release/backend
tinygo build -target=wasip1 -buildmode=c-shared -o ../release/backend/github.wasm .
# The plugin is provider-only: a backend, its migrations and the manifest.
- name: Collect release files
run: |
set -euo pipefail
mkdir -p release/migrations
cp -R backend/migrations/. release/migrations/
cp plugin.json release/plugin.json
- name: Create archives
run: |
set -euo pipefail
tar -czf github-backend-wasm.tar.gz -C release/backend github.wasm
tar -czf github-migrations.tar.gz -C release migrations
tar -czf github-plugin-manifest.tar.gz -C release plugin.json
- name: Generate checksums
run: |
set -euo pipefail
sha256sum github-backend-wasm.tar.gz \
github-migrations.tar.gz \
github-plugin-manifest.tar.gz > checksums.txt
- name: Publish GitHub Release assets
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: |
github-backend-wasm.tar.gz
github-migrations.tar.gz
github-plugin-manifest.tar.gz
checksums.txt