aboutsummaryrefslogtreecommitdiffhomepage
path: root/.gitea
diff options
context:
space:
mode:
authorOphestra Umiker <cat@ophivana.moe>2024-07-15 23:47:08 +0900
committerOphestra Umiker <cat@ophivana.moe>2024-07-15 23:47:08 +0900
commit392717c6dcfbd19a03ec9285d1071f1c46b89ab5 (patch)
tree931007d18d67419385241380a5b36721d2a288c1 /.gitea
parentda7e404bcffe49240554888b1ca665030073799b (diff)
workflows: add release workflow
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
Diffstat (limited to '.gitea')
-rw-r--r--.gitea/workflows/release.yml38
1 files changed, 38 insertions, 0 deletions
diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml
new file mode 100644
index 00000000..c545e7bf
--- /dev/null
+++ b/.gitea/workflows/release.yml
@@ -0,0 +1,38 @@
+name: release
+
+on:
+ push:
+ tags:
+ - '*'
+
+jobs:
+ release:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ - name: Set up go
+ uses: https://github.com/actions/setup-go@v5
+ with:
+ go-version: '>=1.20.1'
+ - name: Get dependencies
+ run: >-
+ sudo apt-get update &&
+ sudo apt-get install -y
+ gcc
+ pkg-config
+ libacl1-dev
+ if: ${{ runner.os == 'Linux' }}
+ - name: Build for Linux
+ run: >-
+ sh -c "go build -v -ldflags '-s -w -X main.Version=${{ github.ref_name }}' -o bin/ego &&
+ sha256sum --tag -b bin/ego > bin/ego.sha256"
+ - name: Release
+ id: use-go-action
+ uses: https://gitea.com/actions/release-action@main
+ with:
+ files: |-
+ bin/**
+ api_key: '${{secrets.RELEASE_TOKEN}}'