add release workflow to gitea
This commit is contained in:
parent
f628a12e87
commit
d3aeb407f2
41
.gitea/workflows/release.yml
Normal file
41
.gitea/workflows/release.yml
Normal file
@ -0,0 +1,41 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-gitea
|
||||
|
||||
steps:
|
||||
|
||||
- name: Prep For Local Builds
|
||||
run: echo "${LOCIP} gitea.comnenos" >> /etc/hosts
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Build Tools
|
||||
run: |
|
||||
apt update
|
||||
apt -y --no-install-recommends install build-essential gcc make
|
||||
|
||||
- name: Build
|
||||
run: make all
|
||||
|
||||
- name: Create Release Archive
|
||||
run: |
|
||||
VERSION=${GITHUB_REF#refs/tags/}
|
||||
mkdir -p release
|
||||
tar -czf release/cordle-${VERSION}-linux-amd64.tar.gz -C build cordle WORDS
|
||||
cd release
|
||||
sha256sum cordle-${VERSION}-linux-amd64.tar.gz > cordle-${VERSION}-linux-amd64.tar.gz.sha256
|
||||
|
||||
- name: Create Release
|
||||
uses: https://gitea.com/actions/release-action@main
|
||||
with:
|
||||
files: |
|
||||
release/*.tar.gz
|
||||
release/*.sha256
|
||||
api_key: ${{ secrets.RELEASE_TOKEN }}
|
||||
Loading…
Reference in New Issue
Block a user