update build runner for latest zig master (#2111) #247
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: Deploy release artifacts | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
# When manually invocing this workflow, keep in mind that ZLS builds can't be modified after they have been published to `releases.zigtools.org/v1/zls/publish`. | |
jobs: | |
deploy: | |
if: github.repository_owner == 'zigtools' && github.ref == 'refs/heads/master' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # required to resolve the version string | |
- uses: mlugg/setup-zig@v1 | |
with: | |
version: master | |
- name: Install APT packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install tar 7zip | |
- name: Install minisign | |
run: | | |
wget https://github.com/jedisct1/minisign/releases/download/0.11/minisign-0.11-linux.tar.gz | |
tar -xf minisign-0.11-linux.tar.gz --directory ${HOME} | |
echo "${HOME}/minisign-linux/x86_64/" >> $GITHUB_PATH | |
- name: Build and Publish artifacts | |
run: | | |
echo "${MINISIGN_SECRET_FILE}" > minisign.key | |
zig build publish -Drelease-minisign -Doptimize=ReleaseSafe --summary all | |
rm -f minisign.key | |
env: | |
ZLS_WORKER_API_TOKEN: ${{ secrets.ZLS_WORKER_API_TOKEN }} | |
MINISIGN_SECRET_FILE: ${{ secrets.MINISIGN_SECRET_FILE }} |