From 82475d30f17488619214bfb62fe74fb46014923a Mon Sep 17 00:00:00 2001 From: Elias Wendland <193786789+eliaswen@users.noreply.github.com> Date: Wed, 15 Jul 2026 18:59:07 +0200 Subject: [PATCH] Release 0.1.0 --- .github/workflows/release.yml | 43 +++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 073980e..a15bc6f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,8 @@ jobs: run: | COMMIT_MSG="${{ github.event.head_commit.message }}" if echo "$COMMIT_MSG" | grep -Eq 'Release [vV]?[0-9]+\.[0-9]+\.[0-9]+'; then - VERSION=$(echo "$COMMIT_MSG" | grep -Eo 'Release [vV]?[0-9]+\.[0-9]+\.[0-9]+' | head -n1 | sed -E 's/Release //') + # Strips "Release " and an optional "v" or "V" to isolate just the numbers + VERSION=$(echo "$COMMIT_MSG" | grep -Eo 'Release [vV]?[0-9]+\.[0-9]+\.[0-9]+' | head -n1 | sed -E 's/Release [vV]?//') echo "match=true" >> $GITHUB_OUTPUT echo "version=$VERSION" >> $GITHUB_OUTPUT else @@ -28,7 +29,7 @@ jobs: if: needs.check-release.outputs.match == 'true' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@stable with: targets: x86_64-unknown-linux-gnu @@ -55,7 +56,7 @@ jobs: if: needs.check-release.outputs.match == 'true' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@stable with: targets: x86_64-unknown-linux-musl @@ -86,7 +87,7 @@ jobs: if: needs.check-release.outputs.match == 'true' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@stable with: targets: x86_64-pc-windows-gnu @@ -114,7 +115,7 @@ jobs: type: [deb, rpm] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@stable with: @@ -130,7 +131,6 @@ jobs: with: name: build-gnu path: target/x86_64-unknown-linux-gnu/release/ - merge-multiple: false - name: Build package run: | @@ -157,7 +157,7 @@ jobs: type: [deb, rpm] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@stable with: @@ -173,7 +173,6 @@ jobs: with: name: build-musl path: target/x86_64-unknown-linux-musl/release/ - merge-multiple: false - name: Build package run: | @@ -197,8 +196,9 @@ jobs: runs-on: ubuntu-latest permissions: contents: write + packages: write steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 with: fetch-depth: 0 @@ -240,4 +240,27 @@ jobs: body_path: changelog.md files: all-packages/**/* env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Publish Packages to Gitea Registry + run: | + GITEA_URL="${{ github.server_url }}" + GITEA_OWNER="${{ github.repository_owner }}" + TOKEN="${{ secrets.GITHUB_TOKEN }}" + + echo "Publishing RPM packages..." + find all-packages/ -type f -name "*.rpm" | while read -r rpm_file; do + echo "Uploading $rpm_file..." + # Using Basic Auth (-u) as requested by Gitea Package Registry Docs + curl -sS --fail -u "${{ github.actor }}:$TOKEN" \ + --upload-file "$rpm_file" \ + "$GITEA_URL/api/packages/$GITEA_OWNER/rpm/upload" + done + + echo "Publishing DEB packages..." + find all-packages/ -type f -name "*.deb" | while read -r deb_file; do + echo "Uploading $deb_file..." + curl -sS --fail -u "${{ github.actor }}:$TOKEN" \ + --upload-file "$deb_file" \ + "$GITEA_URL/api/packages/$GITEA_OWNER/debian/pool/debian/main/upload" + done \ No newline at end of file