6 Commits
+11 -7
View File
@@ -11,6 +11,8 @@ on:
version:
description: 'Version to publish (e.g. 0.3.4)'
required: true
permissions:
contents: write
env:
CARGO_TERM_COLOR: always
jobs:
@@ -66,7 +68,7 @@ jobs:
- name: Create tarball with binary
run: |
tar czf "lapctl-${{ steps.version.outputs.version }}-x86_64.tar.gz" \
--transform="s/^.*\///" lapctl
lapctl LICENSE
- name: Generate PKGBUILD with cargo-aur
run: |
cargo install cargo-aur
@@ -85,7 +87,7 @@ jobs:
cd /build && su builder -c 'makepkg --printsrcinfo > .SRCINFO'
"
- name: Push to AUR
uses: KSXGitHub/github-actions-deploy-aur@v2.5.0
uses: KSXGitHub/github-actions-deploy-aur@v4.1.3
with:
pkgname: lapctl-bin
pkgbuild: aur-pkg/PKGBUILD
@@ -94,13 +96,15 @@ jobs:
ssh_keyscan_types: rsa,ecdsa,ed25519
commit_username: ${{ github.actor }}
commit_email: ${{ github.actor }}@users.noreply.github.com
allow_empty_commits: true
force_push: true
post_process: |
git add -A && git stash && git checkout master && git checkout stash -- . && git stash drop
- name: Upload tarball to release
if: github.ref_type == 'tag'
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release upload "${{ github.ref_name }}" \
"lapctl-${{ steps.version.outputs.version }}-x86_64.tar.gz" --clobber 2>/dev/null ||
gh release create "${{ github.ref_name }}" --title "${{ github.ref_name }}" --notes "" &&
gh release upload "${{ github.ref_name }}" \
TAG="v${{ steps.version.outputs.version }}"
gh release create "$TAG" --title "$TAG" --notes "" 2>/dev/null || true
gh release upload "$TAG" \
"lapctl-${{ steps.version.outputs.version }}-x86_64.tar.gz" --clobber