Skip to content

Commit

Permalink
Add aur publish
Browse files Browse the repository at this point in the history
  • Loading branch information
jmattheis committed May 25, 2020
1 parent ee4d4d8 commit e4dfc18
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,24 @@ jobs:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASS: ${{ secrets.DOCKER_PASS }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish to Archlinux User Repository
if: startsWith(github.ref, 'refs/tags/v')
run: |
mkdir $HOME/.ssh
echo "$SSH_KEY" > $HOME/.ssh/id_rsa
chmod 700 $HOME/.ssh && chmod 600 $HOME/.ssh/id_rsa
ssh-keyscan -H aur.archlinux.org >> ~/.ssh/known_hosts
git clone ssh://[email protected]/snage.git aur-snage
(
cd aur-snage;
sed -i -E 's/pkgrel=[0-9]+/pkgrel=1/g' PKGBUILD;
sed -i -E "s/pkgver=[0-9.]+/pkgver=${VERSION}/g" PKGBUILD;
bash updpkgsums-printsrcinfo-build.sh;
git config user.email "[email protected]";
git config user.name "SnageCI";
git add PKGBUILD .SRCINFO;
git commit -m "Update Version";
git push;
)
env:
SSH_KEY: ${{ secrets.SSH_KEY }}
11 changes: 0 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,6 @@ $ CI=true yarn lerna run test
### Create Release

* [Draft a new release on GitHub](https://github.com/FACT-Finder/snage/releases/new)
* Wait for the build to finish successfully
* AUR
* Clone repository `git clone ssh://[email protected]/snage.git`
* Update `PKGBUILD` with new version and set `pkgrel` to 1 if version changes
* Run `updpkgsums`
* Test build
* Remove old package `sudo pacman -R snage`
* Build package `makepkg`
* Install package `sudo pacman -U snage-xxx-pkg.tar-xz`
* Run `makepkg --printsrcinfo > .SRCINFO`
* Commit and push

[build]: https://github.com/FACT-Finder/snage/actions?query=workflow%3A.github%2Fworkflows%2Fbuild.yml
[build-badge]: https://github.com/FACT-Finder/snage/workflows/.github/workflows/build.yml/badge.svg?branch=master
Expand Down

0 comments on commit e4dfc18

Please sign in to comment.