Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
tags:
- "v*"
pull_request:
branches:
- main

permissions:
contents: write
Expand All @@ -26,7 +29,11 @@ jobs:
run: |
go run ./rootfetch/main.go -o client/trusted_root.json
cp client/trusted_root.json wasm/
VERSION=${GITHUB_REF#refs/tags/}
if [[ "$GITHUB_REF" == refs/tags/v* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
else
VERSION="dev-${GITHUB_SHA::8}"
fi
GOOS=js GOARCH=wasm go build \
-trimpath \
-ldflags="-buildid= -X main.version=${VERSION}" \
Expand Down Expand Up @@ -56,11 +63,13 @@ jobs:
zip -ry TinfoilVerifier.xcframework.zip TinfoilVerifier.xcframework

- name: Deploy to GH pages
if: startsWith(github.ref, 'refs/tags/v')
uses: JamesIves/github-pages-deploy-action@d92aa235d04922e8f08b40ce78cc5442fcfbfa2f # v4.8.0
with:
folder: public

- name: Release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b #v2.5.0
with:
files: |
Expand Down
Loading