2023-04-16 09:02:22 +02:00
|
|
|
# Release Action
|
|
|
|
|
|
|
|
This action will help Gitea users to publish release and attachments.
|
2023-05-14 17:17:39 +02:00
|
|
|
|
|
|
|
## Example
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
name: release
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- '*'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
release:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-05-16 03:58:23 +02:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: setup go
|
|
|
|
uses: https://github.com/actions/setup-go@v4
|
|
|
|
with:
|
|
|
|
go-version: '>=1.20.1'
|
|
|
|
- name: go build
|
|
|
|
run: go build -o bin/myapp
|
2023-05-14 17:17:39 +02:00
|
|
|
- name: Use Go Action
|
|
|
|
id: use-go-action
|
|
|
|
uses: https://gitea.com/actions/release-action@main
|
|
|
|
with:
|
|
|
|
files: |-
|
|
|
|
bin/**
|
|
|
|
api_key: '${{secrets.RELEASE_TOKEN}}'
|
|
|
|
```
|
2023-05-16 03:58:23 +02:00
|
|
|
|
|
|
|
You can find real examples here:
|
|
|
|
|
|
|
|
- https://gitea.com/xorm/reverse/src/branch/main/.gitea/workflows/release-tag.yml
|