mirror of
https://github.com/RubyMetric/chsrc.git
synced 2025-01-22 21:02:59 +08:00
support auto-publish chsrc-bin to AUR
This commit is contained in:
parent
bf666fadfd
commit
253018a4ca
|
@ -1,7 +1,7 @@
|
||||||
# This workflow will publish the `chsrc` package to the AUR
|
# This workflow will publish the `chsrc` and the `chsrc-bin` packages to the AUR
|
||||||
# when there is a new `released` event.
|
# when there is a new `released` event.
|
||||||
# Note: only normal version tags like `v1.2.3` will be published.
|
# Note: only normal version tags like `v1.2.3` will be published.
|
||||||
name: Publish AUR Package (chsrc)
|
name: Publish AUR Package (chsrc, chsrc-bin)
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
types: [ released ]
|
types: [ released ]
|
||||||
|
@ -25,13 +25,31 @@ jobs:
|
||||||
echo "version=$version" >> $GITHUB_ENV
|
echo "version=$version" >> $GITHUB_ENV
|
||||||
echo "valid=1" >> $GITHUB_ENV
|
echo "valid=1" >> $GITHUB_ENV
|
||||||
fi
|
fi
|
||||||
|
- name: Fetch PKGBUILD
|
||||||
|
run: |
|
||||||
|
wget https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD\?h\=chsrc-bin -O ./PKGBUILD_bin
|
||||||
|
- name: Update PKGBUILD
|
||||||
|
run: |
|
||||||
|
sed -i "s/pkgver=.*/pkgver=$version/" PKGBUILD_bin
|
||||||
|
- name: Publish chsrc-bin to AUR
|
||||||
|
if: env.valid == '1'
|
||||||
|
uses: KSXGitHub/github-actions-deploy-aur@v3.0.1
|
||||||
|
with:
|
||||||
|
pkgname: chsrc-bin
|
||||||
|
pkgbuild: ./PKGBUILD_bin
|
||||||
|
updpkgsums: true
|
||||||
|
test: true # Check that PKGBUILD could be built, and update pkgver
|
||||||
|
commit_username: ${{ secrets.AUR_USERNAME }}
|
||||||
|
commit_email: ${{ secrets.AUR_EMAIL }}
|
||||||
|
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY__ }}
|
||||||
|
commit_message: github-action-auto-publish
|
||||||
- name: Fetch PKGBUILD
|
- name: Fetch PKGBUILD
|
||||||
run: |
|
run: |
|
||||||
wget https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD\?h\=chsrc -O ./PKGBUILD
|
wget https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD\?h\=chsrc -O ./PKGBUILD
|
||||||
- name: Update PKGBUILD
|
- name: Update PKGBUILD
|
||||||
run: |
|
run: |
|
||||||
sed -i "s/pkgver=.*/pkgver=$version/" PKGBUILD
|
sed -i "s/pkgver=.*/pkgver=$version/" PKGBUILD
|
||||||
- name: Publish to AUR
|
- name: Publish chsrc to AUR
|
||||||
if: env.valid == '1'
|
if: env.valid == '1'
|
||||||
uses: KSXGitHub/github-actions-deploy-aur@v3.0.1
|
uses: KSXGitHub/github-actions-deploy-aur@v3.0.1
|
||||||
with:
|
with:
|
||||||
|
@ -41,5 +59,5 @@ jobs:
|
||||||
test: true # Check that PKGBUILD could be built, and update pkgver
|
test: true # Check that PKGBUILD could be built, and update pkgver
|
||||||
commit_username: ${{ secrets.AUR_USERNAME }}
|
commit_username: ${{ secrets.AUR_USERNAME }}
|
||||||
commit_email: ${{ secrets.AUR_EMAIL }}
|
commit_email: ${{ secrets.AUR_EMAIL }}
|
||||||
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
|
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY__ }}
|
||||||
commit_message: github-action-auto-publish
|
commit_message: github-action-auto-publish
|
Loading…
Reference in New Issue
Block a user