Compare commits

..

No commits in common. "174cf2069200ed67b2b79309105f89bfb1dfd09d" and "a1ee2b7e61ea17875445d234cc4cc2c2758fffa5" have entirely different histories.

2 changed files with 22 additions and 36 deletions

View file

@ -1,14 +1,9 @@
on:
push:
branches:
- main
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup SSH
run: |
- run: |
mkdir ~/.ssh
chmod 700 ~/.ssh
echo "${{ secrets.ALTAIR_SSH_KEY }}" > ~/.ssh/id_ed25519
@ -16,22 +11,18 @@ jobs:
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
- 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
- uses: actions/setup-go@v5
with:
go-version-file: '/workdir/go.mod'
check-latest: true
cache-dependency-path: "/workdir/**/*.sum"
- name: Build
run: go build
- run: go build
working-directory: /workdir
- name: Upload artifact
uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v3
with:
name: fj.zip
path: /workdir/fj

View file

@ -1,14 +1,12 @@
on:
push:
tags:
- 'v*'
tags: 'v*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Setup SSH
run: |
- run: |
mkdir ~/.ssh
chmod 700 ~/.ssh
echo "${{ secrets.ALTAIR_SSH_KEY }}" > ~/.ssh/id_ed25519
@ -16,31 +14,28 @@ jobs:
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
- 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
- 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
- name: apt install curl jq make
run: |
export DEBIAN_FRONTEND=noninteractive
apt-get update -qq
apt-get -q install -y -qq curl jq make
export DEBIAN_FRONTEND=noninteractive
apt-get update -qq
apt-get -q install -y -qq curl jq make
- name: Build release
- 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
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
- name: publish release
uses: https://code.forgejo.org/actions/forgejo-release@v2.5.1
with:
url: "https://tehga.me/forgejo/"
@ -48,8 +43,8 @@ jobs:
direction: upload
tag: "${{ github.ref_name }}"
sha: "${{ github.sha }}"
release-dir: /workdir/release
token: ${{ secrets.FJ_REGISTRY_TOKEN }}
release-dir: release
token: ${{ github.token }}
override: ${{ vars.OVERRIDE || "false" }}
verbose: ${{ vars.VERBOSE || "false" }}
hide-archive-link: true