Skip to content

Commit

Permalink
Increment tag
Browse files Browse the repository at this point in the history
  • Loading branch information
ThisIsNoahEvans committed Nov 6, 2023
1 parent b65a305 commit d7e4945
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,32 @@ jobs:
- name: Build Binary for Windows
run: GOOS=windows GOARCH=amd64 go build -o resizer-windows-amd64.exe

- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: binaries
path: |
resizer-linux-amd64
resizer-darwin-amd64
resizer-windows-amd64.exe
- name: Determine new tag
id: newtag
run: |
TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
NEW_TAG="${TAG%.*}.$((${TAG##*.}+1))"
echo "Creating new tag $NEW_TAG"
echo "::set-output name=tag::$NEW_TAG"
shell: bash

- name: Push new tag
run: |
git config user.name github-actions
git config user.email [email protected]
git tag ${{ steps.newtag.outputs.tag }}
git push origin ${{ steps.newtag.outputs.tag }}
- name: Create Release
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.sha }}
release_name: Release ${{ github.sha }}
tag_name: ${{ steps.newtag.outputs.tag }}
release_name: Release ${{ steps.newtag.outputs.tag }}
draft: false
prerelease: false


- name: Upload Release Asset for Linux
uses: actions/upload-release-asset@v1
Expand Down

0 comments on commit d7e4945

Please sign in to comment.