Build #22
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 | |
on: | |
workflow_dispatch: | |
jobs: | |
release: | |
name: Build | |
runs-on: ubuntu-22.04 | |
steps: | |
################################################### | |
# | |
# Prepare | |
# | |
################################################### | |
- name: (PREPARE) Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: (PREPARE) Checkout Repository | |
uses: actions/checkout@v3 | |
with: | |
lfs: true | |
- name: (PREPARE) Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: yarn | |
- name: (PREPARE) Install Dependencies | |
run: rm -rf node_modules && yarn --frozen-lockfile | |
################################################### | |
# | |
# Build | |
# | |
################################################### | |
- name: (DOCS) Generate Dependencies Page | |
run: yarn docs:generate:dependencies | |
- name: (BUILD) Build Project | |
run: yarn build | |
- name: (BUILD) Setup Packaging Cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.pkg-cache | |
key: pkg | |
- name: (BUILD) Package Binaries | |
run: yarn package | |
- name: (BUILD) Import Signing Key | |
uses: crazy-max/ghaction-import-gpg@v5 | |
with: | |
gpg_private_key: ${{ secrets.VINTNER_RELEASE_PRIVATE_KEY }} | |
- name: (BUILD) Sign Binaries | |
run: | | |
cd dist | |
for BINARY in vintner-alpine-x64 vintner-linux-arm64 vintner-linux-x64 vintner-win-x64.exe | |
do | |
gpg --no-tty --detach-sign -a --local-user vintner-release ${BINARY} | |
done | |
- name: (BUILD) Compress Binaries | |
run: | | |
cd dist | |
for BINARY in vintner-alpine-x64 vintner-linux-arm64 vintner-linux-x64 vintner-win-x64.exe | |
do | |
tar -cJf ${BINARY}.xz ${BINARY} | |
done | |
################################################### | |
# | |
# Release | |
# | |
################################################### | |
- name: (RELEASE) Delete Build Release | |
run: gh release delete build-${GITHUB_SHA} --cleanup-tag --yes || true | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: (RELEASE) Delete Latest Tag (Local) | |
run: git tag --delete build-${GITHUB_SHA} || true | |
- name: (RELEASE) Create Build Release (and Tag) | |
run: gh release create build-${GITHUB_SHA} -t "Build ${GITHUB_SHA}" -n "This is the build of the commit ${GITHUB_SHA}" ./dist/* | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |