-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automated build and release workflow (#35)
* ci: add actions for creating binaries and releases * ci: merge tag and release workflows for simplicity * ci: rename some stuff and remove deprecated call in create tag * ci: bump setup go and include windows files * ci: remove testing branch trigger * fix: add master to automated release workflow * chore: ignore binaries explicitly * chore: remove brackets on tag_name * chore: remove extra output * chore: remove test branch trigger now that retested --------- Co-authored-by: Jadon Wolffs <[email protected]>
- Loading branch information
1 parent
6bb147f
commit 9efaf83
Showing
3 changed files
with
76 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: Create tag and draft release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Unlock keyring | ||
uses: t1m0thyj/unlock-keyring@v1 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.18 | ||
|
||
- name: Go mod tidy | ||
run: go mod tidy | ||
|
||
- name: Set up MinGW | ||
uses: egor-tensin/setup-mingw@v2 | ||
|
||
- name: Make windows | ||
run: make -C cmd/main win | ||
|
||
- name: Make mac | ||
run: make -C cmd/main mac | ||
|
||
- name: Make linux | ||
run: make -C cmd/main linux | ||
|
||
- name: Set up Git | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
- name: Create Tag | ||
id: create_tag | ||
run: | | ||
TAG_DATE=$(date +'%Y%m%d-%H%M%S') | ||
TAG_NAME="v${TAG_DATE}" | ||
echo "Creating tag ${TAG_NAME}" | ||
git tag $TAG_NAME | ||
git push origin $TAG_NAME | ||
echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT | ||
- name: Create Draft Release | ||
uses: softprops/action-gh-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
body: | | ||
Note: this was an autogenerated release based on a workflow. | ||
tag_name: ${{ steps.create_tag.outputs.tag_name }} | ||
name: Release ${{ steps.create_tag.outputs.tag_name }} | ||
draft: true | ||
generate_release_notes: true | ||
files: | | ||
cmd/main/picli-mac | ||
cmd/main/picli-linux | ||
cmd/main/picli.exe |
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
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