Skip to content

Commit 750bda1

Browse files
committed
Update workflows
1 parent 59cedc1 commit 750bda1

File tree

3 files changed

+38
-14
lines changed

3 files changed

+38
-14
lines changed

.github/workflows/announce.yml

+21-7
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ env:
1010
jobs:
1111
bump-aur-package:
1212
name: Bump AUR Package
13-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-24.04
1414
steps:
1515
- name: Add AUR SSH key
1616
uses: shimataro/ssh-key-action@v2
@@ -27,7 +27,14 @@ jobs:
2727
export REPO_PATH=$WORKDIR/aur-usql
2828
wget -O $WORKDIR/archive.tar.gz https://github.com/xo/usql/archive/${VER}.tar.gz
2929
export SHA256SUM=$(sha256sum $WORKDIR/archive.tar.gz|awk '{print $1}')
30-
export CHANGELOG=$(curl -H "Accept: application/vnd.github+json" https://api.github.com/repos/xo/usql/releases/tags/$VER|jq .body|sed -e 's/\\r//g')
30+
export CHANGELOG=$(
31+
curl \
32+
-s \
33+
-H 'Accept: application/vnd.github+json' \
34+
https://api.github.com/repos/xo/usql/releases/tags/$VER \
35+
|jq -r .body \
36+
|sed -e 's/\\r//g' -e 's/\[VirusTotal.*//'
37+
)
3138
git clone $AUR_REPO $REPO_PATH
3239
git -C $REPO_PATH config user.name 'Kenneth Shaw'
3340
git -C $REPO_PATH config user.email '[email protected]'
@@ -39,34 +46,41 @@ jobs:
3946
sed -i "s/sha256sums =.*$/sha256sums = $SHA256SUM/" $REPO_PATH/.SRCINFO
4047
sed -i "s/pkgrel =.*$/pkgrel = 1/" $REPO_PATH/.SRCINFO
4148
git -C $REPO_PATH add PKGBUILD .SRCINFO
42-
git -C $REPO_PATH commit -m "$(printf %b "Update usql version to ${VER}\n\n${CHANGELOG:1:-1}")"
49+
git -C $REPO_PATH commit -m "$(printf %b "Update usql version to ${VER}\n\n${CHANGELOG}")"
4350
git -C $REPO_PATH show -C
4451
git -C $REPO_PATH push origin master
4552
4653
bump-homebrew-formula:
4754
name: Bump Homebrew Formula
48-
runs-on: ubuntu-latest
55+
runs-on: ubuntu-24.04
4956
steps:
5057
- name: Bump Homebrew Formula
5158
run: |
5259
export WORKDIR=$(mktemp -d /tmp/homebrew-xo.XXXXXX)
5360
export REPO_PATH=$WORKDIR/homebrew-xo
5461
wget -O $WORKDIR/archive.tar.gz https://github.com/xo/usql/archive/${VER}.tar.gz
5562
export SHA256SUM=$(sha256sum $WORKDIR/archive.tar.gz|awk '{print $1}')
56-
export CHANGELOG=$(curl -H "Accept: application/vnd.github+json" https://api.github.com/repos/xo/usql/releases/tags/$VER|jq .body|sed -e 's/\\r//g')
63+
export CHANGELOG=$(
64+
curl \
65+
-s \
66+
-H 'Accept: application/vnd.github+json' \
67+
https://api.github.com/repos/xo/usql/releases/tags/$VER \
68+
|jq -r .body \
69+
|sed -e 's/\\r//g' -e 's/\[VirusTotal.*//'
70+
)
5771
git clone $HOMEBREW_REPO $REPO_PATH
5872
git -C $REPO_PATH config user.name 'Kenneth Shaw'
5973
git -C $REPO_PATH config user.email '[email protected]'
6074
sed -i "s%url \".*$%url \"https://github.com/xo/usql/archive/${VER}.tar.gz\"%" $REPO_PATH/Formula/usql.rb
6175
sed -i "s/sha256 \".*$/sha256 \"$SHA256SUM\"/" $REPO_PATH/Formula/usql.rb
6276
git -C $REPO_PATH add Formula/usql.rb
63-
git -C $REPO_PATH commit -m "$(printf %b "Update usql version to ${VER}\n\n${CHANGELOG:1:-1}")"
77+
git -C $REPO_PATH commit -m "$(printf %b "Update usql version to ${VER}\n\n${CHANGELOG}")"
6478
git -C $REPO_PATH show -C
6579
git -C $REPO_PATH push origin master
6680
6781
announce-discord:
6882
name: Announce Discord
69-
runs-on: ubuntu-latest
83+
runs-on: ubuntu-24.04
7084
steps:
7185
- name: Announce Discord
7286
run: |

.github/workflows/release.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
steps:
5959
- name: Install build dependencies
6060
run: |
61-
brew install coreutils gnu-tar
61+
brew install coreutils
6262
- name: Checkout
6363
uses: actions/checkout@v4
6464
- name: Setup Go
@@ -83,7 +83,7 @@ jobs:
8383
steps:
8484
- name: Install build dependencies
8585
run: |
86-
brew install coreutils gnu-tar
86+
brew install coreutils
8787
- name: Download artifacts
8888
uses: actions/download-artifact@v4
8989
- name: Build universal
@@ -219,7 +219,7 @@ jobs:
219219
220220
# append virustotal details to release notes
221221
nl=$'\n'
222-
body+="$nl[VirusTotal](https://www.virustotal.com) analysis:$nl"
222+
body+="$nl$nl[VirusTotal](https://www.virustotal.com) analysis:$nl"
223223
while read -r -d, line; do
224224
name=$(sed -e 's/^\.\/scan\/\([^=]\+\)=.*/\1/' <<< "$line")
225225
vturl=$(sed -e 's/.*=\(https.*\)/\1/' <<< "$line")

.github/workflows/test.yml

+14-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Test usql
33
jobs:
44
test:
55
name: Build and Test usql
6-
runs-on: ubuntu-latest
6+
runs-on: ubuntu-24.04
77
services:
88
cassandra:
99
image: docker.io/usql/cassandra:latest
@@ -41,8 +41,18 @@ jobs:
4141
- name: Checkout code
4242
uses: actions/checkout@v4
4343
- name: Unit Tests
44-
run: go test -v ./stmt
44+
run: |
45+
go test -v ./stmt
4546
- name: Build with all drivers
46-
run: ./build.sh -b -t all
47+
run: |
48+
./build.sh -b -t all
4749
- name: Shell Tests
48-
run: go run testcli.go
50+
run: |
51+
go run testcli.go &> output.log
52+
ls -alh output.log
53+
- name: Archive output
54+
uses: actions/upload-artifact@v4
55+
with:
56+
name: output
57+
path: output.log
58+
if-no-files-found: error

0 commit comments

Comments
 (0)