add repeat parameter on cycle and dice nodes #97
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: | |
push: | |
branches: ["main"] | |
tags: ["v*"] | |
pull_request: | |
branches: ["main"] | |
permissions: | |
contents: write | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, macos-13, windows-2019] | |
runs-on: ${{ matrix.os }} | |
env: | |
CGO_ENABLED: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Alsa headers | |
run: sudo apt-get install libasound2-dev | |
if: startsWith(matrix.os, 'ubuntu') | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.23 | |
- name: Release version number | |
run: echo '${{ github.ref_name}}' > VERSION | |
if: ${{ github.ref_type == 'tag' }} | |
- name: Development version number | |
run: echo 'dev-${{ github.sha}}' > VERSION | |
if: ${{ github.ref_type == 'branch' }} | |
- name: Build linux|mac | |
run: go build -o bin/signls && chmod +x bin/signls | |
if: ${{ !startsWith(matrix.os, 'windows') }} | |
- name: Build windows | |
run: go build -ldflags "-linkmode 'external' -extldflags '-static'" -o bin/signls.exe | |
if: startsWith(matrix.os, 'windows') | |
- name: Tar.gz linux|mac files | |
run: tar -zcvf signls_${{ github.ref_name }}_${{ runner.os}}.tar.gz LICENSE -C bin signls | |
if: ${{ !startsWith(matrix.os, 'windows') }} | |
- name: Zip windows files | |
shell: pwsh | |
run: | | |
Compress-Archive bin\signls.exe signls_${{ github.ref_name }}_${{ runner.os}}.zip | |
if: ${{ startsWith(matrix.os, 'windows') }} | |
- name: Upload linux|mac artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: signls_${{ github.sha }}_${{ runner.os}} | |
path: signls_${{ github.ref_name }}_${{ runner.os}}.tar.gz | |
if-no-files-found: error | |
if: ${{ !startsWith(matrix.os, 'windows') }} | |
- name: Upload windows artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: signls_${{ github.sha }}_${{ runner.os}} | |
path: signls_${{ github.ref_name }}_${{ runner.os}}.zip | |
if-no-files-found: error | |
if: ${{ startsWith(matrix.os, 'windows') }} | |
release: | |
needs: build | |
if: startsWith(github.ref, 'refs/tags/v') | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
with: | |
name: signls_${{ github.sha }}_macOS | |
- uses: actions/[email protected] | |
with: | |
name: signls_${{ github.sha }}_Linux | |
- uses: actions/[email protected] | |
with: | |
name: signls_${{ github.sha }}_Windows | |
- name: Create release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
signls_*.tar.gz | |
signls_*.zip | |
# itchio-release: | |
# needs: release | |
# if: startsWith(github.ref, 'refs/tags/v') | |
# runs-on: ubuntu-latest | |
# strategy: | |
# matrix: | |
# os: [Linux, macOS, Windows] | |
# env: | |
# itchio_project: "emprcl/signls" | |
# steps: | |
# - uses: actions/[email protected] | |
# with: | |
# name: signls_${{ github.sha }}_${{ matrix.os }} | |
# - uses: robpc/itchio-upload-action@v1 | |
# with: | |
# path: signls_${{ github.sha }}_${{ matrix.os }} | |
# project: ${{ env.itchio_project }} | |
# channel: ${{ matrix.os }} | |
# version: ${{ github.ref_name}} | |
# api-key: ${{ secrets.ITCHIO_API_KEY }} |