Skip to content

TestRelease

TestRelease #2

Workflow file for this run

name: Go Build and Release
on:
release:
types: [published] # This triggers the workflow when a new release is published
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.23' # Specify your Go version
- name: Install dependencies
run: go mod download
- name: Build the Go project
run: go build -v ./...
- name: Run tests
run: go test ./...
release:
needs: build # This job runs after the build job succeeds
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.23'
- name: Upload build artifacts to the release
uses: actions/upload-artifact@v3
with:
name: go-build
path: ./archivist_go
- name: Update the GitHub release
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.event.release.tag_name }}
name: ${{ github.event.release.tag_name }}
body: |
This is an automated release for version ${{ github.event.release.tag_name }}.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}