Skip to content

update demo

update demo #11

Workflow file for this run

name: Release
# Every merge to main bumps the patch version (derived from commit count),
# builds all platforms, and publishes a GitHub Release with the binaries.
# The version tag is created by the release step, pointing at the commit
# that triggered this workflow.
on:
push:
branches: [main]
concurrency:
group: release-main
cancel-in-progress: true
permissions:
contents: write
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 24
cache: npm
- run: npm ci
- run: npm test
version:
needs: test
runs-on: ubuntu-latest
outputs:
version: ${{ steps.compute.outputs.version }}
tag: ${{ steps.compute.outputs.tag }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- id: compute
run: |
BASE=$(cat VERSION | tr -d '[:space:]')
PATCH=$(git rev-list --count HEAD)
VERSION="${BASE}.${PATCH}"
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
echo "tag=v${VERSION}" >> "$GITHUB_OUTPUT"
build:
needs: version
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
script: build:linux
- os: macos-latest
script: build:mac
- os: windows-latest
script: build:win
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 24
cache: npm
- run: npm ci
- run: npm version --no-git-tag-version ${{ needs.version.outputs.version }}
- run: npm run ${{ matrix.script }}
env:
CSC_LINK: ${{ matrix.os == 'macos-latest' && secrets.CSC_LINK || '' }}
CSC_KEY_PASSWORD: ${{ matrix.os == 'macos-latest' && secrets.CSC_KEY_PASSWORD || '' }}
APPLE_ID: ${{ matrix.os == 'macos-latest' && secrets.APPLE_ID || '' }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ matrix.os == 'macos-latest' && secrets.APPLE_APP_SPECIFIC_PASSWORD || '' }}
APPLE_TEAM_ID: ${{ matrix.os == 'macos-latest' && secrets.APPLE_TEAM_ID || '' }}
- uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.os }}
path: |
dist/*.dmg
dist/*.AppImage
dist/*-setup.exe
dist/latest*.yml
if-no-files-found: warn
release:
needs: [version, build]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
pattern: dist-*
merge-multiple: true
path: release-files
- name: Generate checksums
run: |
cd release-files
sha256sum * > SHA256SUMS.txt
cat SHA256SUMS.txt
- run: |
gh release create "$TAG" \
--repo "$GITHUB_REPOSITORY" \
--title "BucketLine $TAG" \
--target "$COMMIT" \
--generate-notes \
release-files/*
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ needs.version.outputs.tag }}
COMMIT: ${{ github.sha }}