Skip to content

Commit 09d1951

Browse files
authored
Merge pull request #25 from stackql/feature/updates
updated node
2 parents b16e378 + 97ec720 commit 09d1951

8 files changed

Lines changed: 328 additions & 286 deletions

File tree

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 'Setup StackQL'
1+
name: 'setup stackql'
22

33
on:
44
push:
@@ -22,32 +22,36 @@ jobs:
2222

2323
steps:
2424
- name: Checkout
25-
uses: actions/checkout@v3
25+
uses: actions/checkout@v4.1.4
2626

2727
- name: Setup Stackql
2828
uses: ./
2929
with:
3030
use_wrapper: ${{matrix.use_wrapper}}
3131

32-
- name: Validate Stackql Version
32+
- name: Get Stackql Version
33+
id: get-stackql-version
3334
run: |
34-
stackql --version
35+
echo "stackql_version<<EOF" >> $GITHUB_ENV
36+
stackql --version >> $GITHUB_ENV
37+
echo "EOF" >> $GITHUB_ENV
3538
36-
- name: Use GitHub Provider
39+
- name: Validate Stackql Version
3740
run: |
38-
stackql exec -i ./examples/github-example.iql
39-
env:
40-
STACKQL_GITHUB_USERNAME: ${{ secrets.STACKQL_GITHUB_USERNAME }}
41-
STACKQL_GITHUB_PASSWORD: ${{ secrets.STACKQL_GITHUB_PASSWORD }}
42-
43-
- name: Use Google Provider
44-
run: |
45-
stackql exec -i ./examples/google-example.iql
46-
env:
47-
GOOGLE_CREDENTIALS : ${{ secrets.GOOGLE_CREDENTIALS }}
48-
49-
- name: Handle error
50-
if: ${{ matrix.use_wrapper}}
51-
continue-on-error: true
52-
run: | ## specify a query file that doesnt exist
53-
stackql exec -i ./examples/does-not-exist.iql
41+
# Extract only the relevant line containing version information
42+
VERSION_OUTPUT=$(echo "${{ env.stackql_version }}" | grep -E 'stackql v[0-9]+\.[0-9]+\.[0-9]+')
43+
echo "Version output: $VERSION_OUTPUT"
44+
45+
SEMVER_REGEX="v[0-9]+\.[0-9]+\.[0-9]+"
46+
PLATFORM_REGEX="(Linux|Darwin|Windows|Homebrew)"
47+
48+
if ! [[ "$VERSION_OUTPUT" =~ $SEMVER_REGEX ]]; then
49+
echo "Semantic version does not match expected format"
50+
exit 1
51+
fi
52+
if ! [[ "$VERSION_OUTPUT" =~ $PLATFORM_REGEX ]]; then
53+
echo "Platform information does not match expected formats"
54+
exit 1
55+
fi
56+
57+
echo "version output validated successfully."

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Check the "Use GitHub Provider" step in [setup-stackql.yml](.github/workflows/se
1717

1818
```yaml
1919
- name: setup StackQL
20-
uses: stackql/setup-stackql@v2.0.0
20+
uses: stackql/setup-stackql@v2.1.0
2121
with:
2222
use_wrapper: true
2323

@@ -34,7 +34,7 @@ Check the "Use Google Provider" step in [setup-stackql.yml](.github/workflows/se
3434
3535
```yaml
3636
- name: setup StackQL
37-
uses: stackql/setup-stackql@v2.0.0
37+
uses: stackql/setup-stackql@v2.1.0
3838
with:
3939
use_wrapper: true
4040

action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ inputs:
88
required: false
99

1010
runs:
11-
using: 'node16'
11+
using: 'node20'
1212
main: 'dist/index.js'
13+
1314
branding:
1415
icon: 'terminal'
1516
color: 'green'

0 commit comments

Comments
 (0)