Skip to content

Commit

Permalink
chore(fix): name to env var
Browse files Browse the repository at this point in the history
  • Loading branch information
waldirborbajr committed Nov 17, 2023
1 parent 3ddcfa6 commit d440fe0
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
# - 'v[0-9]+.*'
env:
RUST_BACKTRACE: full
TARGET_NAME: urlencode

jobs:
release:
Expand Down Expand Up @@ -68,19 +69,19 @@ jobs:
args: --release --locked --target=${{ matrix.job.target }}

- name: Strip debug information
run: strip target/${{ matrix.job.target }}/release/urlencode
run: strip target/${{ matrix.job.target }}/release/$TARGET_NAME

- name: Archive
run: tar czf urlencode-${{ needs.release.outputs.release_version }}-${{ matrix.job.target }}.tar.gz -C target/${{ matrix.job.target }}/release urlencode
run: tar czf $TARGET_NAME-${{ needs.release.outputs.release_version }}-${{ matrix.job.target }}.tar.gz -C target/${{ matrix.job.target }}/release $TARGET_NAME

- name: Upload release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.release_upload_url }}
asset_path: urlencode-${{ needs.release.outputs.release_version }}-${{ matrix.job.target }}.tar.gz
asset_name: urlencode-${{ needs.release.outputs.release_version }}-${{ matrix.job.target }}.tar.gz
asset_path: $TARGET_NAME-${{ needs.release.outputs.release_version }}-${{ matrix.job.target }}.tar.gz
asset_name: $TARGET_NAME-${{ needs.release.outputs.release_version }}-${{ matrix.job.target }}.tar.gz
asset_content_type: application/octet-stream

build-win:
Expand Down Expand Up @@ -111,14 +112,14 @@ jobs:
args: --release --locked --target=${{ matrix.job.target }}

- name: Archive
run: 7z -y a urlencode-${{ needs.release.outputs.release_version }}-${{ matrix.job.target }}.exe.zip target/${{ matrix.job.target }}/release/urlencode.exe
run: 7z -y a $TARGET_NAME-${{ needs.release.outputs.release_version }}-${{ matrix.job.target }}.exe.zip target/${{ matrix.job.target }}/release/$TARGET_NAME.exe

- name: Upload release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.release_upload_url }}
asset_path: urlencode-${{ needs.release.outputs.release_version }}-${{ matrix.job.target }}.exe.zip
asset_name: urlencode-${{ needs.release.outputs.release_version }}-${{ matrix.job.target }}.exe.zip
asset_path: $TARGET_NAME-${{ needs.release.outputs.release_version }}-${{ matrix.job.target }}.exe.zip
asset_name: $TARGET_NAME-${{ needs.release.outputs.release_version }}-${{ matrix.job.target }}.exe.zip
asset_content_type: application/zip

0 comments on commit d440fe0

Please sign in to comment.