add(action): release action
All checks were successful
Go Project Action / Spell-check and test go project (push) Successful in 32s
Go Project Action / Spell-check and test go project (release) Successful in 32s
Release Go Application / Release go project (release) Has been skipped
Release Go Application / on-failure (release) Has been skipped
All checks were successful
Go Project Action / Spell-check and test go project (push) Successful in 32s
Go Project Action / Spell-check and test go project (release) Successful in 32s
Release Go Application / Release go project (release) Has been skipped
Release Go Application / on-failure (release) Has been skipped
This commit is contained in:
35
.gitea/workflows/release.yaml
Normal file
35
.gitea/workflows/release.yaml
Normal file
@@ -0,0 +1,35 @@
|
||||
name: Release Go Application
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_run:
|
||||
workflows: [Go Project Action]
|
||||
types: [completed]
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Release go project
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup Go installation
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: 1.23.x
|
||||
- name: Install dependencies
|
||||
run: go get .
|
||||
- name: Build
|
||||
run: go build -ldflags "-s -w" -o ./bin/serve main.go
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: serve
|
||||
path: ./bin/serve
|
||||
on-failure:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
|
||||
steps:
|
||||
- run: echo 'Cannot release with failing tests'
|
||||
Reference in New Issue
Block a user