Skip to content

Commit 07cbe88

Browse files
authored
Update workflow (#2)
1 parent 91f8690 commit 07cbe88

File tree

1 file changed

+21
-28
lines changed

1 file changed

+21
-28
lines changed

Diff for: .github/workflows/release.yml

+21-28
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
name: Release
22

33
on:
4-
push:
5-
tags:
6-
- v*
4+
release:
5+
types: [published]
76

87
env:
98
CARGO_TERM_COLOR: always
@@ -43,12 +42,12 @@ jobs:
4342
bin_suffix: macos
4443
steps:
4544
- name: Checkout repository
46-
uses: actions/checkout@v2
45+
uses: actions/checkout@v4.2.2
4746
with:
4847
fetch-depth: 1
4948

5049
- name: Cache
51-
uses: actions/cache@v2
50+
uses: actions/cache@v4.1.2
5251
with:
5352
path: |
5453
~/.cargo/registry
@@ -74,24 +73,21 @@ jobs:
7473
run: cp target/${{ matrix.target }}/release/esp_exception_decoder esp_exception_decoder_${{ matrix.bin_suffix }}
7574

7675
- name: Release
77-
uses: softprops/action-gh-release@v1
78-
if: startsWith(github.ref, 'refs/tags/')
76+
uses: softprops/[email protected]
7977
with:
8078
files: esp_exception_decoder_${{ matrix.bin_suffix }}
81-
env:
82-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8379

8480
publish-exe-to-github:
8581
name: Publish exe tool to Github
8682
runs-on: ubuntu-latest
8783
steps:
8884
- name: Checkout repository
89-
uses: actions/checkout@v2
85+
uses: actions/checkout@v4.2.2
9086
with:
9187
fetch-depth: 1
9288

9389
- name: Cache
94-
uses: actions/cache@v2
90+
uses: actions/cache@v4.1.2
9591
with:
9692
path: |
9793
~/.cargo/registry
@@ -113,19 +109,16 @@ jobs:
113109
run: cargo build --release --target x86_64-pc-windows-gnu
114110

115111
- name: Release
116-
uses: softprops/action-gh-release@v1
117-
if: startsWith(github.ref, 'refs/tags/')
112+
uses: softprops/[email protected]
118113
with:
119114
files: target/x86_64-pc-windows-gnu/release/esp_exception_decoder.exe
120-
env:
121-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
122115

123116
publish-web-to-github:
124117
name: Publish web tool to GitHub
125118
runs-on: ubuntu-latest
126119

127120
steps:
128-
- uses: actions/checkout@v2
121+
- uses: actions/checkout@v4.2.2
129122
- uses: actions-rs/toolchain@v1
130123
with:
131124
toolchain: stable
@@ -137,21 +130,21 @@ jobs:
137130
run: wasm-pack build --target web --out-dir web/
138131
- name: Make an archive for web deployment
139132
run: tar czf esp_exception_decoder_wasm.tar.gz -C web index.html esp_exception_decoder_rs.js esp_exception_decoder_rs_bg.wasm
140-
133+
141134
- name: Release
142-
uses: softprops/action-gh-release@v1
143-
if: startsWith(github.ref, 'refs/tags/')
135+
uses: softprops/[email protected]
144136
with:
145137
files: esp_exception_decoder_wasm.tar.gz
146-
env:
147-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
148-
138+
149139
- name: Copy files for GitHub Pages deployment
150140
run: mkdir -p public; cp web/index.html web/esp_exception_decoder_rs.js web/esp_exception_decoder_rs_bg.wasm public/
151-
- uses: crazy-max/ghaction-github-pages@v2
141+
142+
- uses: actions/[email protected]
152143
with:
153-
target_branch: gh-pages
154-
build_dir: public
155-
verbose: true
156-
env:
157-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
144+
path: public
145+
retention-days: 1
146+
- name: Setup Pages
147+
uses: actions/[email protected]
148+
- name: Deploy to GitHub Pages
149+
id: deployment
150+
uses: actions/[email protected]

0 commit comments

Comments
 (0)