feat: track last selected index and update current item command in li… #7
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 Go Project | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: "go.mod" | |
- name: Cross compile and package | |
run: | | |
mkdir -p bin | |
# Linux binaries | |
GOOS=linux GOARCH=amd64 go build -o bin/go-workflows . | |
tar -czvf bin/go-workflows-linux-amd64.tar.gz -C bin go-workflows | |
GOOS=linux GOARCH=arm64 go build -o bin/go-workflows . | |
tar -czvf bin/go-workflows-linux-arm64.tar.gz -C bin go-workflows | |
# macOS binaries | |
GOOS=darwin GOARCH=amd64 go build -o bin/go-workflows . | |
tar -czvf bin/go-workflows-darwin-amd64.tar.gz -C bin go-workflows | |
GOOS=darwin GOARCH=arm64 go build -o bin/go-workflows . | |
tar -czvf bin/go-workflows-darwin-arm64.tar.gz -C bin go-workflows | |
# Windows binaries | |
GOOS=windows GOARCH=amd64 go build -o bin/go-workflows.exe . | |
zip -j bin/go-workflows-windows-amd64.zip bin/go-workflows.exe | |
- name: Determine release type | |
id: release_type | |
run: | | |
TAG_NAME="${{ github.ref_name }}" | |
if [[ "$TAG_NAME" =~ ^v[0-9]+\.[0-9]+\.1$ ]]; then | |
echo "is_prerelease=true" >> $GITHUB_ENV | |
else | |
echo "is_prerelease=false" >> $GITHUB_ENV | |
fi | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: Release ${{ github.ref_name }} | |
body: | | |
This release includes: | |
- Linux binaries (amd64, arm64) | |
- macOS binaries (amd64, arm64) | |
- Windows binary (amd64) | |
files: | | |
bin/go-workflows-linux-amd64.tar.gz | |
bin/go-workflows-linux-arm64.tar.gz | |
bin/go-workflows-darwin-amd64.tar.gz | |
bin/go-workflows-darwin-arm64.tar.gz | |
bin/go-workflows-windows-amd64.zip | |
prerelease: ${{ env.is_prerelease }} |