Skip to content

Commit 050ed6c

Browse files
authored
Merge pull request #112 from sicpa-dlab/feature/update_actions
chore: bump checkout, cache, and setup-node actions to v3
2 parents abeccc1 + 93350e8 commit 050ed6c

File tree

2 files changed

+31
-31
lines changed

2 files changed

+31
-31
lines changed

.github/workflows/release.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,42 +34,42 @@ jobs:
3434
already_in_npm_nodejs: ${{ steps.check_in_npm.outputs.already_in_npm_nodejs != '' }}
3535

3636
steps:
37-
- uses: actions/checkout@v2
37+
- uses: actions/checkout@v3
3838

3939
- name: Get current version
4040
id: current_version
4141
run: |
4242
version="$(cargo -q metadata --no-deps \
4343
| jq -r '.packages[] | select(.name == "${{ env.PKG_NAME }}") | .version')"
4444
echo "$version"
45-
echo "::set-output name=current_version::$version"
45+
echo "current_version=$version" >> $GITHUB_OUTPUT
4646
shell: bash
4747

4848
- name: Get release info
4949
id: release_info
5050
run: |
5151
release_info="$(curl -s https://api.github.com/repos/${{ github.repository }}/releases \
5252
| jq '.[] | select(.name == "v${{ steps.current_version.outputs.current_version }}")')"
53-
echo "::set-output name=release_info::$release_info"
53+
echo "release_info=$release_info" >> $GITHUB_OUTPUT
5454
echo "$release_info"
5555
5656
asset_crate_url="$(echo "$release_info" \
5757
| jq -r '.assets[] | select(.name | match("^${{ env.PKG_NAME }}.*\\.crate$")) | .browser_download_url')"
58-
echo "::set-output name=asset_crate_url::$asset_crate_url"
58+
echo "asset_crate_url=$asset_crate_url" >> $GITHUB_OUTPUT
5959
echo "$asset_crate_url"
6060
6161
asset_npm_pkg_bundler_url="$(echo "$release_info" \
6262
| jq -r '.assets[] | select(.name | match("^${{ env.PKG_NAME }}-${{ steps.current_version.outputs.current_version }}\\.tgz$")) | .browser_download_url')"
63-
echo "::set-output name=asset_npm_pkg_bundler_url::$asset_npm_pkg_bundler_url"
63+
echo "asset_npm_pkg_bundler_url=$asset_npm_pkg_bundler_url" >> $GITHUB_OUTPUT
6464
echo "$asset_npm_pkg_bundler_url"
6565
6666
asset_npm_pkg_nodejs_url="$(echo "$release_info" \
6767
| jq -r '.assets[] | select(.name | match("^${{ env.PKG_NAME_NODEJS }}-${{ steps.current_version.outputs.current_version }}\\.tgz$")) | .browser_download_url')"
68-
echo "::set-output name=asset_npm_pkg_nodejs_url::$asset_npm_pkg_nodejs_url"
68+
echo "asset_npm_pkg_nodejs_url=$asset_npm_pkg_nodejs_url" >> $GITHUB_OUTPUT
6969
echo "$asset_npm_pkg_nodejs_url"
7070
7171
upload_url="$(echo "$release_info" | jq -r '.upload_url')"
72-
echo "::set-output name=upload_url::$upload_url"
72+
echo "upload_url=$upload_url" >> $GITHUB_OUTPUT
7373
echo "$upload_url"
7474
shell: bash
7575

@@ -79,7 +79,7 @@ jobs:
7979
out="$(curl -s https://crates.io/api/v1/crates/${{ env.PKG_NAME }} | jq -r '.versions[] | .num' \
8080
| grep '^${{ steps.current_version.outputs.current_version }}$')"
8181
echo "in crates.io check: $out"
82-
echo "::set-output name=already_in_crates_io::$out"
82+
echo "already_in_crates_io=$out" >> $GITHUB_OUTPUT
8383
shell: bash {0} # to opt-out of default fail-fast behavior
8484

8585
- name: check if already deployed to npm
@@ -88,12 +88,12 @@ jobs:
8888
out="$(npm view ${{ env.PKG_NAME }}@${{ steps.current_version.outputs.current_version }} --json 2>/dev/null \
8989
| jq -r '.versions | select (.!=null)')"
9090
echo "in npm check for ${{ env.PKG_NAME }} : $out"
91-
echo "::set-output name=already_in_npm_bundler::$out"
91+
echo "already_in_npm_bundler=$out" >> $GITHUB_OUTPUT
9292
9393
out="$(npm view ${{ env.PKG_NAME_NODEJS }}@${{ steps.current_version.outputs.current_version }} --json 2>/dev/null \
9494
| jq -r '.versions | select (.!=null)')"
9595
echo "in npm check for ${{ env.PKG_NAME_NODEJS }}: $out"
96-
echo "::set-output name=already_in_npm_nodejs::$out"
96+
echo "already_in_npm_nodejs=$out" >> $GITHUB_OUTPUT
9797
shell: bash {0} # to opt-out of default fail-fast behavior
9898

9999

@@ -103,7 +103,7 @@ jobs:
103103
runs-on: ubuntu-latest
104104
needs: checks
105105
steps:
106-
- uses: actions/checkout@v2
106+
- uses: actions/checkout@v3
107107

108108
- name: Set rustup profile & toolchain
109109
run: |
@@ -130,9 +130,9 @@ jobs:
130130
if: ${{ !(needs.checks.outputs.asset_crate_url && needs.checks.outputs.asset_npm_pkg_bundler_url && needs.checks.outputs.asset_npm_pkg_nodejs_url) }}
131131
run: |
132132
if [[ -n "${{ needs.checks.outputs.upload_url }}" ]]; then
133-
echo "::set-output name=value::${{ needs.checks.outputs.upload_url }}"
133+
echo "value=${{ needs.checks.outputs.upload_url }}" >> $GITHUB_OUTPUT
134134
else
135-
echo "::set-output name=value::${{ steps.create_release.outputs.upload_url }}"
135+
echo "value=${{ steps.create_release.outputs.upload_url }}" >> $GITHUB_OUTPUT
136136
fi
137137
138138
- name: package and verify (crate)
@@ -148,7 +148,7 @@ jobs:
148148
cargo package --list
149149
150150
asset_name="$(find target/package -name '*.crate' -printf '%f')"
151-
echo "::set-output name=asset_name::$asset_name"
151+
echo "asset_name=$asset_name" >> $GITHUB_OUTPUT
152152
shell: bash
153153

154154
- name: upload to GitHub (crate)
@@ -169,7 +169,7 @@ jobs:
169169
# build, install (verify) and pack
170170
make -C wasm build install pack
171171
asset_name="$(find wasm/pkg -name '*.tgz' -printf '%f')"
172-
echo "::set-output name=asset_name::$asset_name"
172+
echo "asset_name=$asset_name" >> $GITHUB_OUTPUT
173173
shell: bash
174174

175175
- name: upload to GitHub (npm bundler)
@@ -190,7 +190,7 @@ jobs:
190190
# build, install (verify) and pack
191191
WASM_TARGET=nodejs PKG_NAME=${{ env.PKG_NAME_NODEJS }} make -C wasm build install pack
192192
asset_name="$(find wasm/pkg -name '*.tgz' -printf '%f')"
193-
echo "::set-output name=asset_name::$asset_name"
193+
echo "asset_name=$asset_name" >> $GITHUB_OUTPUT
194194
shell: bash
195195

196196
- name: upload to GitHub (npm nodejs)
@@ -238,7 +238,7 @@ jobs:
238238
if: github.ref != 'refs/heads/stable' && github.event_name == 'workflow_dispatch'
239239
runs-on: ubuntu-latest
240240
steps:
241-
- uses: actions/checkout@v2
241+
- uses: actions/checkout@v3
242242

243243
- name: Set rustup profile & toolchain
244244
run: |

.github/workflows/verify.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,21 @@ jobs:
2020
shell: bash
2121

2222
steps:
23-
- uses: actions/checkout@v2
23+
- uses: actions/checkout@v3
2424

2525
- name: Get current version
2626
id: current_version
2727
run: |
2828
version="$(cargo -q metadata --no-deps \
2929
| jq -r '.packages[] | select(.name == "${{ env.PKG_NAME }}") | .version')"
3030
echo "$version"
31-
echo "::set-output name=current_version::$version"
31+
echo "current_version=$version" >> $GITHUB_OUTPUT
3232
3333
cd wasm
3434
version="$(cargo -q metadata --no-deps \
3535
| jq -r '.packages[] | select(.name == "${{ env.PKG_NAME_JS_TMP }}") | .version')"
3636
echo "$version"
37-
echo "::set-output name=current_wasm_version::$version"
37+
echo "current_wasm_version=$version" >> $GITHUB_OUTPUT
3838
3939
- name: Check version format
4040
run: |
@@ -47,7 +47,7 @@ jobs:
4747
run: |
4848
release_info="$(curl -s https://api.github.com/repos/${{ github.repository }}/releases \
4949
| jq '.[] | select(.name == "v${{ steps.current_version.outputs.current_version }}")')"
50-
echo "::set-output name=release_info::$release_info"
50+
echo "release_info=$release_info" >> $GITHUB_OUTPUT
5151
echo "$release_info"
5252
5353
- name: check version bumped
@@ -83,7 +83,7 @@ jobs:
8383

8484
steps:
8585
- name: Checkout
86-
uses: actions/checkout@v2
86+
uses: actions/checkout@v3
8787

8888
- name: Set rustup profile & toolchain
8989
run: |
@@ -92,8 +92,8 @@ jobs:
9292
9393
- name: Get timestamp for cache
9494
id: date
95-
run: echo ::set-output name=yearmo::$(date +%Y%m)
96-
- uses: actions/cache@v2
95+
run: echo "yearmo=$(date +%Y%m)" >> $GITHUB_OUTPUT
96+
- uses: actions/cache@v3
9797
with:
9898
path: |
9999
~/.cargo/bin/
@@ -129,7 +129,7 @@ jobs:
129129

130130
steps:
131131
- name: Checkout
132-
uses: actions/checkout@v2
132+
uses: actions/checkout@v3
133133

134134
- name: Set rustup profile & toolchain
135135
run: |
@@ -138,8 +138,8 @@ jobs:
138138
139139
- name: Get timestamp for cache
140140
id: date
141-
run: echo ::set-output name=yearmo::$(date +%Y%m)
142-
- uses: actions/cache@v2
141+
run: echo "yearmo=$(date +%Y%m)" >> $GITHUB_OUTPUT
142+
- uses: actions/cache@v3
143143
with:
144144
path: |
145145
~/.cargo/bin/
@@ -160,7 +160,7 @@ jobs:
160160

161161
# TODO caching, makes sense for demo and tests-js where lock files are presented
162162
- name: Set up Node.js
163-
uses: actions/setup-node@v2
163+
uses: actions/setup-node@v3
164164
with:
165165
node-version: ${{ matrix.node }}
166166

@@ -229,7 +229,7 @@ jobs:
229229

230230
steps:
231231
- name: Checkout
232-
uses: actions/checkout@v2
232+
uses: actions/checkout@v3
233233

234234
- name: Set rustup profile & toolchain
235235
run: |
@@ -238,8 +238,8 @@ jobs:
238238
239239
- name: Get timestamp for cache
240240
id: date
241-
run: echo ::set-output name=yearmo::$(date +%Y%m)
242-
- uses: actions/cache@v2
241+
run: echo "yearmo=$(date +%Y%m)" >> $GITHUB_OUTPUT
242+
- uses: actions/cache@v3
243243
with:
244244
path: |
245245
~/.cargo/bin/

0 commit comments

Comments
 (0)