diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index f9390bd..5233536 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -1,15 +1,15 @@ name: Github Pages # By default, runs if you push to main. keeps your deployed app in sync with main branch. -on: - push: - branches: - - main -# to only run when you do a new github release, comment out above part and uncomment the below trigger. # on: -# release: -# types: -# - published +# push: +# branches: +# - main +# to only run when you do a new github release, comment out above part and uncomment the below trigger. +on: + release: + types: + - published permissions: contents: write # for committing to gh-pages branch. diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 1190de0..f10e13c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -163,11 +163,12 @@ jobs: - uses: svenstaro/upload-release-action@v2 name: Upload binaries to release - if: ${{ github.event_name == 'push' }} + if: startsWith(github.ref, 'refs/tags/') with: repo_token: ${{ secrets.GITHUB_TOKEN }} file: web_value_tracker-${{ matrix.TARGET }}${{ matrix.EXTENSION }} asset_name: web_value_tracker-${{ matrix.TARGET }}${{ matrix.EXTENSION }} - tag: ${{ github.ref }} - prerelease: ${{ !startsWith(github.ref, 'refs/tags/') }} + tag: ${{ github.ref_name }} + prerelease: false overwrite: true + make_latest: true