diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f33582d..52dad07 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,13 +1,16 @@ name: Release on: - push: - tags: - - v* + release: + types: [published] env: CARGO_TERM_COLOR: always + +permissions: + contents: write + jobs: publish-bin-to-github: name: Publish bin tool to Github @@ -43,12 +46,12 @@ jobs: bin_suffix: macos steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4.2.2 with: fetch-depth: 1 - name: Cache - uses: actions/cache@v2 + uses: actions/cache@v4.1.2 with: path: | ~/.cargo/registry @@ -74,24 +77,21 @@ jobs: run: cp target/${{ matrix.target }}/release/esp_exception_decoder esp_exception_decoder_${{ matrix.bin_suffix }} - name: Release - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') + uses: softprops/action-gh-release@v2.1.0 with: files: esp_exception_decoder_${{ matrix.bin_suffix }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} publish-exe-to-github: name: Publish exe tool to Github runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4.2.2 with: fetch-depth: 1 - name: Cache - uses: actions/cache@v2 + uses: actions/cache@v4.1.2 with: path: | ~/.cargo/registry @@ -113,19 +113,20 @@ jobs: run: cargo build --release --target x86_64-pc-windows-gnu - name: Release - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') + uses: softprops/action-gh-release@v2.1.0 with: files: target/x86_64-pc-windows-gnu/release/esp_exception_decoder.exe - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} publish-web-to-github: name: Publish web tool to GitHub runs-on: ubuntu-latest + permissions: + pages: write + id-token: write + contents: write steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4.2.2 - uses: actions-rs/toolchain@v1 with: toolchain: stable @@ -137,21 +138,21 @@ jobs: run: wasm-pack build --target web --out-dir web/ - name: Make an archive for web deployment run: tar czf esp_exception_decoder_wasm.tar.gz -C web index.html esp_exception_decoder_rs.js esp_exception_decoder_rs_bg.wasm - + - name: Release - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') + uses: softprops/action-gh-release@v2.1.0 with: files: esp_exception_decoder_wasm.tar.gz - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - + - name: Copy files for GitHub Pages deployment run: mkdir -p public; cp web/index.html web/esp_exception_decoder_rs.js web/esp_exception_decoder_rs_bg.wasm public/ - - uses: crazy-max/ghaction-github-pages@v2 + + - uses: actions/upload-pages-artifact@v3.0.1 with: - target_branch: gh-pages - build_dir: public - verbose: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + path: public + retention-days: 1 + - name: Setup Pages + uses: actions/configure-pages@v5.0.0 + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4.0.5 diff --git a/README.md b/README.md index 1c3f3b5..2493f6a 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ It is composed of a ⌨️ Rust library, a 💻 Rust command line tool, and a ### Web tool -The web tool is hosted on [Github Pages here](https://maximeborges.github.io/esp-stacktrace-decoder/). +The web tool is hosted on [Github Pages here](https://esphome.github.io/esp-stacktrace-decoder/). It is taking your `.elf` firmware and the stack trace, and outputs the list of functions and their locations, without uploading any of your data anywhere. @@ -14,7 +14,7 @@ Everything run in your browser, ✨just like that✨. ![screenshot](https://user-images.githubusercontent.com/159235/136428494-4fdb6c69-74ca-42ab-8bf7-e26d1d625a28.png) -You can also deploy it yourself by hosting the content of the pre-compiled package `esp_exception_decoder_wasm.tar.gz` on the [release page](https://github.com/maximeborges/esp-stacktrace-decoder/releases), or by compiling the library in WebAssembly using `wasm-pack`: +You can also deploy it yourself by hosting the content of the pre-compiled package `esp_exception_decoder_wasm.tar.gz` on the [release page](https://github.com/esphome/esp-stacktrace-decoder/releases), or by compiling the library in WebAssembly using `wasm-pack`: # Install the Rust toolchain by following the latest instructions from here: https://www.rust-lang.org/tools/install # Install wasm-pack by following the latest instructions from here: https://rustwasm.github.io/wasm-pack/installer @@ -35,7 +35,7 @@ A bit more boring command line tool is also available: ![esp_exception_decoder_rs_cli](https://user-images.githubusercontent.com/159235/136429806-48b82e04-cc55-4dda-84de-d143001165c3.png) -Get the latest binary release here: [Releases](https://github.com/maximeborges/esp-stacktrace-decoder/releases) +Get the latest binary release here: [Releases](https://github.com/esphome/esp-stacktrace-decoder/releases) Or build it yourself: