-
Notifications
You must be signed in to change notification settings - Fork 356
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consolidating and cleaning up workflows
- Loading branch information
Showing
3 changed files
with
65 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,76 @@ | ||
name: Discord Announce | ||
name: Announce Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
env: | ||
VER: ${{ github.ref_name }} | ||
HOMEBREW_REPO: https://kenshaw:${{ secrets.HOMEBREW_TOKEN }}@github.com/xo/homebrew-xo.git | ||
AUR_REPO: [email protected]:usql.git | ||
|
||
jobs: | ||
homebrew: | ||
bump-aur-package: | ||
name: Bump AUR Package | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Add AUR SSH key | ||
uses: shimataro/ssh-key-action@v2 | ||
with: | ||
key: ${{ secrets.AUR_SSH_KEY }} | ||
name: id_ed25519 | ||
known_hosts: | | ||
aur.archlinux.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEuBKrPzbawxA/k2g6NcyV5jmqwJ2s+zpgZGZ7tpLIcN | ||
aur.archlinux.org ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDKF9vAFWdgm9Bi8uc+tYRBmXASBb5cB5iZsB7LOWWFeBrLp3r14w0/9S2vozjgqY5sJLDPONWoTTaVTbhe3vwO8CBKZTEt1AcWxuXNlRnk9FliR1/eNB9uz/7y1R0+c1Md+P98AJJSJWKN12nqIDIhjl2S1vOUvm7FNY43fU2knIhEbHybhwWeg+0wxpKwcAd/JeL5i92Uv03MYftOToUijd1pqyVFdJvQFhqD4v3M157jxS5FTOBrccAEjT+zYmFyD8WvKUa9vUclRddNllmBJdy4NyLB8SvVZULUPrP3QOlmzemeKracTlVOUG1wsDbxknF1BwSCU7CmU6UFP90kpWIyz66bP0bl67QAvlIc52Yix7pKJPbw85+zykvnfl2mdROsaT8p8R9nwCdFsBc9IiD0NhPEHcyHRwB8fokXTajk2QnGhL+zP5KnkmXnyQYOCUYo3EKMXIlVOVbPDgRYYT/XqvBuzq5S9rrU70KoI/S5lDnFfx/+lPLdtcnnEPk= | ||
aur.archlinux.org ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBLMiLrP8pVi5BFX2i3vepSUnpedeiewE5XptnUnau+ZoeUOPkpoCgZZuYfpaIQfhhJJI5qgnjJmr4hyJbe/zxow= | ||
- name: Bump AUR Package | ||
run: | | ||
export WORKDIR=$(mktemp -d /tmp/aur-usql.XXXXXX) | ||
export REPO_PATH=$WORKDIR/aur-usql | ||
wget -O $WORKDIR/archive.tar.gz https://github.com/xo/usql/archive/${VER}.tar.gz | ||
export SHA256SUM=$(sha256sum $WORKDIR/archive.tar.gz|awk '{print $1}') | ||
export CHANGELOG=$(curl -H "Accept: application/vnd.github+json" https://api.github.com/repos/xo/usql/releases/tags/$VER|jq -r .body) | ||
git clone $AUR_REPO $REPO_PATH | ||
git -C $REPO_PATH config user.name 'Kenneth Shaw' | ||
git -C $REPO_PATH config user.email '[email protected]' | ||
sed -i "s/pkgver=.*$/pkgver=${VER#v}/" $REPO_PATH/PKGBUILD | ||
sed -i "s/sha256sums=.*$/sha256sums=('$SHA256SUM')/" $REPO_PATH/PKGBUILD | ||
sed -i "s/pkgver =.*$/pkgver = ${VER#v}/" $REPO_PATH/.SRCINFO | ||
sed -i "s%source =.*$%source = usql-${VER#v}.tar.gz::https://github.com/xo/usql/archive/${VER}.tar.gz%" $REPO_PATH/.SRCINFO | ||
sed -i "s/sha256sums =.*$/sha256sums = $SHA256SUM/" $REPO_PATH/.SRCINFO | ||
git -C $REPO_PATH add PKGBUILD .SRCINFO | ||
git -C $REPO_PATH commit -m "Update usql version to ${VER}\n\n${CHANGELOG}" | ||
git -C $REPO_PATH show -C | ||
git -C $REPO_PATH push origin master | ||
bump-homebrew-formula: | ||
name: Bump Homebrew Formula | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Bump Homebrew Formula | ||
run: | | ||
export WORKDIR=$(mktemp -d /tmp/homebrew-xo.XXXXXX) | ||
export REPO_PATH=$WORKDIR/homebrew-xo | ||
wget -O $WORKDIR/archive.tar.gz https://github.com/xo/usql/archive/${VER}.tar.gz | ||
export SHA256SUM=$(sha256sum $WORKDIR/archive.tar.gz|awk '{print $1}') | ||
export CHANGELOG=$(curl -H "Accept: application/vnd.github+json" https://api.github.com/repos/xo/usql/releases/tags/$VER|jq -r .body) | ||
git clone $HOMEBREW_REPO $REPO_PATH | ||
git -C $REPO_PATH config user.name 'Kenneth Shaw' | ||
git -C $REPO_PATH config user.email '[email protected]' | ||
sed -i "s%url \".*$%url \"https://github.com/xo/usql/archive/${VER}.tar.gz\"%" $REPO_PATH/Formula/usql.rb | ||
sed -i "s/sha256 \".*$/sha256 \"$SHA256SUM\"/" $REPO_PATH/Formula/usql.rb | ||
git -C $REPO_PATH add Formula/usql.rb | ||
git -C $REPO_PATH commit -m "Update usql version to ${VER}\n\n${CHANGELOG}" | ||
git -C $REPO_PATH show -C | ||
git -C $REPO_PATH push origin master | ||
announce-discord: | ||
name: Announce Discord | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: announce | ||
- name: Announce Discord | ||
run: | | ||
curl \ | ||
-H 'Content-Type: application/json' \ | ||
-d '{"username": "usql", "content": "> *usql ${{ github.ref_name }}* has been released!\n\nGet it here: https://github.com/xo/usql/releases/${{ github.ref_name }}"}' \ | ||
${{ secrets.DISCORD_WEBHOOK_URL }} | ||
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.