Skip to content

Commit

Permalink
CI: separate aur scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Dec 7, 2023
1 parent a84e22d commit 151c7ea
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 13 deletions.
39 changes: 28 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ concurrency:
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
DRY_RUN: ${{ startsWith(github.event.ref, 'refs/tags/v') && '0' || '1' }}

jobs:
build-tarball:
Expand Down Expand Up @@ -181,8 +182,6 @@ jobs:
- build-tarball
- rpm
- deb
env:
DRY_RUN: ${{ startsWith(github.event.ref, 'refs/tags/v') && '0' || '1' }}
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -234,12 +233,6 @@ jobs:
files: releases/${{github.ref_name}}/*
generate_release_notes: true
token: ${{ secrets.RTX_GITHUB_BOT_TOKEN }}
- name: Release to aur
run: scripts/release-aur.sh
working-directory: rtx
- name: Release aur-bin
run: scripts/release-aur-bin.sh
working-directory: rtx
bump-homebrew-formula:
runs-on: macos-latest
if: startsWith(github.event.ref, 'refs/tags/v')
Expand All @@ -254,13 +247,37 @@ jobs:
with:
token: ${{ secrets.RTX_GITHUB_BOT_TOKEN }}
formula: rtx
bump-aur:
runs-on: ubuntu-22.04
timeout-minutes: 30
needs: [e2e-linux]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.RTX_SSH_KEY }}
known_hosts: ${{ secrets.RTX_KNOWN_HOSTS_AUR }}
- name: Bump aur
run: ./scripts/release-aur.sh
bump-aur-bin:
runs-on: ubuntu-22.04
timeout-minutes: 30
needs: [e2e-linux]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.RTX_SSH_KEY }}
known_hosts: ${{ secrets.RTX_KNOWN_HOSTS_AUR }}
- name: Bump aur-bin
run: ./scripts/release-aur-bin.sh
bump-alpine:
runs-on: ubuntu-22.04
container: ghcr.io/jdx/rtx:alpine
timeout-minutes: 30
needs: [release]
env:
DRY_RUN: ${{ startsWith(github.event.ref, 'refs/tags/v') && '0' || '1' }}
needs: [e2e-linux]
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
6 changes: 5 additions & 1 deletion scripts/release-aur-bin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ EOF

cd aur-bin
git add .SRCINFO PKGBUILD
if git diff-index --quiet HEAD --; then
echo "No changes to PKGBUILD or .SRCINFO"
exit 0
fi
git commit -m "rtx ${RTX_VERSION#v}"
if [[ "$DRY_RUN" != 1 ]]; then
if [[ "$DRY_RUN" == 0 ]]; then
git push
fi
6 changes: 5 additions & 1 deletion scripts/release-aur.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ EOF

cd aur
git add .SRCINFO PKGBUILD
if git diff-index --quiet HEAD --; then
echo "No changes to PKGBUILD or .SRCINFO"
exit 0
fi
git commit -m "rtx ${RTX_VERSION#v}"
if [ "$DRY_RUN" != 1 ]; then
if [ "$DRY_RUN" == 0 ]; then
git push
fi

0 comments on commit 151c7ea

Please sign in to comment.