This repository has been archived by the owner on Aug 30, 2024. It is now read-only.
forked from daddycocoaman/azbelt
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (45 loc) · 1.6 KB
/
autorelease.yml
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
name: 'Build and Release'
on:
workflow_dispatch:
push:
tags: ["v[0-9]+.[0-9]+.[0-9]+"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v2
- name: Build and run dev container task
uses: devcontainers/ci@v0.2
with:
runCmd: |
sudo apt-get update --fix-missing && sudo apt-get -y install mingw-w64 binutils-mingw-w64 g++-mingw-w64
nimble -y release
mkdir -p build
cp extension.json build/
cd build
tar -czvf ../azbelt.tar.gz .
- name: Minisign
run: |
MINISIGN_TMP=`mktemp -d`
cd $MINISIGN_TMP
wget https://github.com/aead/minisign/releases/download/v0.2.0/minisign-linux-amd64.tar.gz
tar xvf minisign-linux-amd64.tar.gz
mv ./minisign ~/minisign
- name: Sign Package
run: |
touch ~/minisign.key && chmod 600 ~/minisign.key
echo -e "${{ secrets.MINISIGN_PRIVATE_KEY }}" > ~/minisign.key
MANIFEST=$(cat build/extension.json | base64 -w 0)
bash -c "echo \"\" | ~/minisign -s ~/minisign.key -S -m ./azbelt.tar.gz -t \"$MANIFEST\" -x azbelt.minisig"
- name: Release to Github
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
build/*.dll
build/*.exe
azbelt.tar.gz
azbelt.minisig