fj/.forgejo/workflows/release.yml
Nicola Zangrandi a1ee2b7e61
Some checks failed
/ build (push) Successful in 35s
/ publish (push) Failing after 42s
feat(ci): added release workflow
2025-02-05 11:06:45 +01:00

51 lines
1.6 KiB
YAML

on:
push:
tags: 'v*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- run: |
mkdir ~/.ssh
chmod 700 ~/.ssh
echo "${{ secrets.ALTAIR_SSH_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan -p 999 tehga.me >> ~/.ssh/known_hosts
ssh-keyscan -p 999 doradus.tehga.me >> ~/.ssh/known_hosts
- run: git clone --depth 1 ssh://gitea@tehga.me:999/wasp/fj.git --branch main --single-branch /workdir
- uses: actions/setup-go@v5
with:
go-version-file: '/workdir/go.mod'
check-latest: true
cache-dependency-path: "/workdir/**/*.sum"
- name: apt install curl jq make
run: |
export DEBIAN_FRONTEND=noninteractive
apt-get update -qq
apt-get -q install -y -qq curl jq make
- name: build release
run: |
version="${{ github.ref_name }}"
mkdir release
go build -ldflags "-extldflags -static -s -w -X \"main.Version=${version##*v}\""
cp -a /workdir/fj release/fj
- name: publish release
uses: https://code.forgejo.org/actions/forgejo-release@v2.5.1
with:
url: "https://tehga.me/forgejo/"
repo: "${{ github.repository }}"
direction: upload
tag: "${{ github.ref_name }}"
sha: "${{ github.sha }}"
release-dir: release
token: ${{ github.token }}
override: ${{ vars.OVERRIDE || "false" }}
verbose: ${{ vars.VERBOSE || "false" }}
hide-archive-link: true
release-notes-assistant: true