Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions .github/workflows/auto-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [main]

jobs:
tag:
tag-and-release:
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -14,6 +14,17 @@ jobs:
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.25'

- name: Test
run: go test -v ./...

- name: Build
run: go build -o gosh app/*.go

- name: Get latest tag and bump patch
id: bump
run: |
Expand All @@ -33,10 +44,17 @@ jobs:
echo "Created tag: v${major}.${minor}.${new_patch}"

- name: Create and push tag
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git tag ${{ steps.bump.outputs.new_tag }}
git push origin ${{ steps.bump.outputs.new_tag }}

- name: Create Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.bump.outputs.new_tag }}
files: gosh
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}