Skip to content

Commit f31a9fb

Browse files
committed
ci: Backport changes to workflows after moving back to GitHub
1 parent 712412b commit f31a9fb

File tree

7 files changed

+115
-151
lines changed

7 files changed

+115
-151
lines changed

.forgejo/workflows/qa.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.forgejo/workflows/release.yml

Lines changed: 0 additions & 100 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
target-branch: trunk
Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,21 @@ on:
44
push:
55
tags:
66
- 'v*'
7+
workflow_dispatch:
8+
inputs:
9+
tag:
10+
description: 'Tag to build (e.g. v11.3.1)'
11+
required: true
712

813
jobs:
914
build:
1015
name: Build and upload binary artifacts
11-
runs-on: codeberg-medium
16+
runs-on: ubuntu-latest
1217
container: archlinux:latest
1318

1419
steps:
15-
- name: Create resolv.conf
16-
run: |
17-
set -ex
18-
echo 'nameserver 8.8.8.8' >/etc/resolv.conf
19-
echo 'nameserver 8.8.4.4' >>/etc/resolv.conf
20-
2120
- name: Install dependencies
22-
run: pacman --noconfirm -Syu && pacman --needed --noconfirm -S nodejs base-devel gnupg git autoconf automake nasm curl mtools llvm clang lld mingw-w64-gcc
21+
run: pacman --noconfirm -Syu && pacman --needed --noconfirm -S base-devel gnupg git autoconf automake nasm curl mtools llvm clang lld
2322

2423
- name: Import GPG public key
2524
run: gpg --batch --keyserver hkps://keyserver.ubuntu.com --recv-keys 05D29860D0A0668AAEFB9D691F3C021BECA23821
@@ -30,23 +29,24 @@ jobs:
3029
MINTSUKI_PRIVATE_KEY: ${{ secrets.MINTSUKI_PRIVATE_KEY }}
3130

3231
- name: Checkout code
33-
uses: https://code.forgejo.org/actions/checkout@v6
32+
uses: actions/checkout@v6
3433
with:
3534
fetch-depth: '0'
35+
ref: ${{ inputs.tag || github.ref }}
3636

3737
- name: Git config
3838
run: |
3939
set -e
40-
git config --global --add safe.directory "$FORGEJO_WORKSPACE"
40+
git config --global --add safe.directory "$GITHUB_WORKSPACE"
4141
git config --global user.name 'Mintsuki'
4242
git config --global user.email 'mintsuki@protonmail.com'
4343
git config --global user.signingkey 05D29860D0A0668AAEFB9D691F3C021BECA23821
4444
4545
- name: Get tag name
46-
run: echo "TAG_NAME=$(git describe --exact-match --tags $(git log -n1 --pretty='%h'))" >> $FORGEJO_ENV
46+
run: echo "TAG_NAME=$(git describe --exact-match --tags $(git log -n1 --pretty='%h'))" >> $GITHUB_ENV
4747

4848
- name: Get branch name
49-
run: echo "BRANCH_NAME=$(echo "$TAG_NAME" | grep -o 'v[0-9]\+\.')x" >> $FORGEJO_ENV
49+
run: echo "BRANCH_NAME=$(echo "$TAG_NAME" | grep -o 'v[0-9]\+\.')x" >> $GITHUB_ENV
5050

5151
- name: Regenerate
5252
run: ./bootstrap
@@ -63,11 +63,18 @@ jobs:
6363
- name: Clean limine
6464
run: rm build/bin/limine
6565

66+
- name: Fetch MinGW
67+
run: |
68+
set -e
69+
curl -Lo /tmp/mingw-i486.tar.xz https://github.com/osdev0/mingw-binary-builds/releases/latest/download/mingw-i486.tar.xz
70+
cd /tmp
71+
tar -xf mingw-i486.tar.xz
72+
6673
- name: Build limine for Windows
67-
run: make -C build/bin CC="i686-w64-mingw32-gcc" CFLAGS="-O2 -pipe" CPPFLAGS="-D__USE_MINGW_ANSI_STDIO" limine
74+
run: make -C build/bin CC="/tmp/mingw-i486/bin/i486-w64-mingw32-gcc" CFLAGS="-O2 -pipe" CPPFLAGS="-D__USE_MINGW_ANSI_STDIO" limine
6875

6976
- name: Strip limine for Windows
70-
run: i686-w64-mingw32-strip build/bin/limine.exe
77+
run: /tmp/mingw-i486/bin/i486-w64-mingw32-strip build/bin/limine.exe
7178

7279
- name: Copy LICENSE to bin
7380
run: cp COPYING build/bin/LICENSE
@@ -78,7 +85,7 @@ jobs:
7885
- name: Push binaries to binary branch
7986
run: |
8087
set -e
81-
git remote set-url origin https://x-access-token:${{ secrets.FORGEJO_TOKEN }}@codeberg.org/Limine/Limine.git
88+
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/Limine-Bootloader/Limine.git
8289
git fetch --all
8390
git checkout $BRANCH_NAME-binary || git checkout --orphan $BRANCH_NAME-binary
8491
rm -rf $(ls -a | grep -v '^\.git$' | grep -v '^\.\.$' | grep -v '^\.$' | grep -v '^build$')
Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,21 @@ on: [push, pull_request]
55
jobs:
66
build:
77
name: Check for compilation failures
8-
runs-on: codeberg-small
8+
runs-on: ubuntu-latest
99
container: archlinux:latest
1010

1111
steps:
12-
- name: Create resolv.conf
13-
run: |
14-
set -ex
15-
echo 'nameserver 8.8.8.8' >/etc/resolv.conf
16-
echo 'nameserver 8.8.4.4' >>/etc/resolv.conf
17-
1812
- name: Install dependencies
19-
run: pacman --noconfirm -Syu && pacman --needed --noconfirm -S nodejs base-devel git autoconf automake nasm curl mtools llvm clang lld
13+
run: pacman --noconfirm -Syu && pacman --needed --noconfirm -S base-devel git autoconf automake nasm curl mtools llvm clang lld
2014

2115
- name: Checkout code
22-
uses: https://code.forgejo.org/actions/checkout@v6
16+
uses: actions/checkout@v6
2317

2418
- name: Build the bootloader (LLVM, default)
2519
run: ./bootstrap && ./configure --enable-werror --enable-all && make all && make distclean
2620

2721
- name: Set cross GCC version
28-
run: echo "GCC_VERSION=15.2.0" >> $FORGEJO_ENV
22+
run: echo "GCC_VERSION=15.2.0" >> $GITHUB_ENV
2923

3024
- name: Download GCC cross toolchains
3125
run: |
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ on: [ pull_request ]
55
jobs:
66
pr_branch_check:
77
name: Check that the PR is targetting trunk
8-
runs-on: codeberg-tiny
8+
runs-on: ubuntu-latest
99
steps:
1010
- name: Check that the PR is targetting trunk
11-
if: ${{ forge.base_ref != 'trunk' }}
11+
if: ${{ github.base_ref != 'trunk' }}
1212
run: |
1313
set -e
1414
echo "The PR is not targetting the trunk branch, please fix that."

.github/workflows/release.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build:
10+
name: Build and upload release tarball
11+
runs-on: ubuntu-latest
12+
container: archlinux:latest
13+
14+
steps:
15+
- name: Install dependencies
16+
run: pacman --noconfirm -Syu && pacman --needed --noconfirm -S base-devel gnupg gzip bzip2 xz git autoconf automake nasm curl mtools llvm clang lld
17+
18+
- name: Import GPG public key
19+
run: gpg --batch --keyserver hkps://keyserver.ubuntu.com --recv-keys 05D29860D0A0668AAEFB9D691F3C021BECA23821
20+
21+
- name: Import GPG private key
22+
run: echo "$MINTSUKI_PRIVATE_KEY" | gpg --batch --import
23+
env:
24+
MINTSUKI_PRIVATE_KEY: ${{ secrets.MINTSUKI_PRIVATE_KEY }}
25+
26+
- name: Checkout code
27+
uses: actions/checkout@v6
28+
with:
29+
fetch-depth: '0'
30+
31+
- name: Git config
32+
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
33+
34+
- name: Get tag name
35+
run: echo "TAG_NAME=$(git describe --exact-match --tags $(git log -n1 --pretty='%h'))" >> $GITHUB_ENV
36+
37+
- name: Package release tarball
38+
run: |
39+
set -e
40+
./bootstrap
41+
./configure
42+
make dist
43+
44+
- name: Sign release tarball
45+
run: |
46+
set -e
47+
for f in limine-*.tar.*; do \
48+
gpg --batch --default-key 05D29860D0A0668AAEFB9D691F3C021BECA23821 --detach-sign $f; \
49+
done
50+
51+
- name: Create release notes
52+
run: |
53+
cat <<EOF >rel_notes.txt
54+
Changelog can be found [here](https://github.com/Limine-Bootloader/Limine/blob/$TAG_NAME/ChangeLog).
55+
56+
Binary release can be found [here](https://github.com/Limine-Bootloader/Limine/tree/$TAG_NAME-binary).
57+
EOF
58+
cat <<'EOF' >>rel_notes.txt
59+
60+
Tarballs are signed using key ID `05D29860D0A0668AAEFB9D691F3C021BECA23821` which can be obtained from a keyserver such as `keyserver.ubuntu.com`.
61+
62+
Import the public key with:
63+
```bash
64+
gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 05D29860D0A0668AAEFB9D691F3C021BECA23821
65+
```
66+
67+
In order to verify the tarball with the given signature, do:
68+
```bash
69+
gpg --verify <tarball sig file> <associated tarball>
70+
```
71+
EOF
72+
73+
- name: Release
74+
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda
75+
with:
76+
body_path: rel_notes.txt
77+
files: |
78+
limine-*.tar.*
79+
env:
80+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)