ci: woodpecker -> forgejo actions
This commit is contained in:
parent
02fd112b65
commit
12c921d58c
3 changed files with 60 additions and 21 deletions
38
.forgejo/workflows/release.yml
Normal file
38
.forgejo/workflows/release.yml
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: docker-x86_64
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Zig
|
||||||
|
uses: https://github.com/goto-bus-stop/setup-zig@v2
|
||||||
|
with:
|
||||||
|
version: 0.12.0
|
||||||
|
|
||||||
|
- name: Setup Packages
|
||||||
|
run: |
|
||||||
|
apt update
|
||||||
|
apt install -y ca-certificates zip libarchive-dev libarchive13
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
zig build -Doptimize=ReleaseFast
|
||||||
|
|
||||||
|
- name: Zip
|
||||||
|
run: |
|
||||||
|
mkdir release
|
||||||
|
cd zig-out
|
||||||
|
zip -r ../release/zupper-linux-x86_64.zip .
|
||||||
|
|
||||||
|
- name: Upload
|
||||||
|
uses: actions/forgejo-release@v1
|
||||||
|
with:
|
||||||
|
direction: upload
|
||||||
|
release-dir: release
|
||||||
|
token: ${{ env.GITHUB_TOKEN }}
|
22
.forgejo/workflows/test.yml
Normal file
22
.forgejo/workflows/test.yml
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: docker
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Zig
|
||||||
|
uses: https://github.com/goto-bus-stop/setup-zig@v2
|
||||||
|
with:
|
||||||
|
version: 0.12.0
|
||||||
|
|
||||||
|
- name: Setup Packages
|
||||||
|
run: |
|
||||||
|
apt update
|
||||||
|
apt install -y ca-certificates libarchive-dev libarchive13
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: |
|
||||||
|
zig fmt --check .
|
|
@ -1,21 +0,0 @@
|
||||||
steps:
|
|
||||||
build:
|
|
||||||
image: git.mzte.de/lordmzte/zig-build
|
|
||||||
pull: true
|
|
||||||
commands:
|
|
||||||
- apt update
|
|
||||||
- apt install -y ca-certificates libarchive-dev libarchive13
|
|
||||||
|
|
||||||
- zig fmt --check .
|
|
||||||
- zig build -Doptimize=ReleaseFast
|
|
||||||
|
|
||||||
publish:
|
|
||||||
image: woodpeckerci/plugin-gitea-release
|
|
||||||
settings:
|
|
||||||
base_url: https://git.mzte.de
|
|
||||||
api_key:
|
|
||||||
from_secret: forgejo_key
|
|
||||||
title: tag-${CI_COMMIT_TAG}
|
|
||||||
files: zig-out/bin/zupper
|
|
||||||
when:
|
|
||||||
event: tag
|
|
Loading…
Reference in a new issue