fj/.forgejo/workflows/release.yml
Nicola Zangrandi 174cf20692
Some checks failed
/ build (push) Successful in 38s
/ publish (push) Failing after 2m24s
fix(ci): updated secrets
2025-02-05 11:39:35 +01:00

56 lines
1.7 KiB
YAML

on:
push:
tags:
- 'v*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Setup SSH
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
- name: Checkout
run: git clone --depth 1 ssh://gitea@tehga.me:999/wasp/fj.git --branch main --single-branch /workdir
- name: Setup Go
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
working-directory: /workdir
- 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: /workdir/release
token: ${{ secrets.FJ_REGISTRY_TOKEN }}
override: ${{ vars.OVERRIDE || "false" }}
verbose: ${{ vars.VERBOSE || "false" }}
hide-archive-link: true
release-notes-assistant: true