This repository has been archived by the owner on Aug 30, 2024. It is now read-only.
Merge pull request #3 from sliverarmory/fix/action #8
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | | |
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 | |