Revert "add pre-release" #31
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 - Continuous | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- '**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go-version: [ '1.21.x' ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Go ${{ matrix.go-version }} | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Dependencies | |
run: | | |
go get . | |
- name: Build Info | |
run: | | |
echo "GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)" >> "$GITHUB_ENV" | |
echo "GIT_HASH=$(git rev-parse --verify HEAD)" >> "$GITHUB_ENV" | |
echo "GIT_DIRTY=$(git diff --quiet; [ $? -eq 0 ] && echo false || echo true)" >> "$GITHUB_ENV" | |
- name: Build | |
run: | | |
CGO_ENABLED=0 go build -ldflags "-X main.gitBranch=$GIT_BRANCH -X main.gitHash=$GIT_HASH -X main.gitDirty=$GIT_DIRTY" | |
- name: Copy Binary | |
run: | | |
mkdir -p release-bin/ | |
cp r2modman-headless release-bin/r2modman-headless-linux-amd64 | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
LICENSE | |
release-bin/** |