Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Geal committed Nov 13, 2021
1 parent ca19842 commit f006dd0
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,28 +30,28 @@ jobs:
runs-on: ubuntu-latest
# env:
# Set to force version number, e.g., when no tag exists.
# RG_VERSION: TEST-0.0.0
# BISCUIT_VERSION: TEST-0.0.0
outputs:
upload_url: ${{ steps.release.outputs.upload_url }}
rg_version: ${{ env.RG_VERSION }}
biscuit_version: ${{ env.BISCUIT_VERSION }}
steps:
- name: Get the release version from the tag
shell: bash
if: env.RG_VERSION == ''
if: env.BISCUIT_VERSION == ''
run: |
# Apparently, this is the right way to get a tag name. Really?
#
# See: https://github.jparrowsec.cnmunity/t5/GitHub-Actions/How-to-get-just-the-tag-name/m-p/32167/highlight/true#M1027
echo "RG_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
echo "version is: ${{ env.RG_VERSION }}"
echo "BISCUIT_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
echo "version is: ${{ env.BISCUIT_VERSION }}"
- name: Create GitHub release
id: release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.RG_VERSION }}
release_name: ${{ env.RG_VERSION }}
tag_name: ${{ env.BISCUIT_VERSION }}
release_name: ${{ env.BISCUIT_VERSION }}

build-release:
name: build-release
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:

- name: Strip release binary (linux and macos)
if: matrix.build == 'linux' || matrix.build == 'macos'
run: strip "target/${{ matrix.target }}/release/rg"
run: strip "target/${{ matrix.target }}/release/biscuit"

- name: Strip release binary (arm)
if: matrix.build == 'linux-arm'
Expand All @@ -150,19 +150,19 @@ jobs:
"$PWD/target:/target:Z" \
rustembedded/cross:arm-unknown-linux-gnueabihf \
arm-linux-gnueabihf-strip \
/target/arm-unknown-linux-gnueabihf/release/rg
/target/arm-unknown-linux-gnueabihf/release/biscuit
- name: Build archive
shell: bash
run: |
outdir="$(ci/cargo-out-dir "${{ env.TARGET_DIR }}")"
staging="biscuit-${{ needs.create-release.outputs.rg_version }}-${{ matrix.target }}"
staging="biscuit-${{ needs.create-release.outputs.biscuit_version }}-${{ matrix.target }}"
mkdir -p "$staging"/{complete,doc}
cp {README.md,COPYING,UNLICENSE,LICENSE-MIT} "$staging/"
cp {CHANGELOG.md,FAQ.md,GUIDE.md} "$staging/doc/"
cp "$outdir"/{rg.bash,rg.fish,_rg.ps1} "$staging/complete/"
cp complete/_rg "$staging/complete/"
#cp "$outdir"/{rg.bash,rg.fish,_rg.ps1} "$staging/complete/"
#cp complete/_rg "$staging/complete/"
if [ "${{ matrix.os }}" = "windows-2019" ]; then
cp "target/${{ matrix.target }}/release/rg.exe" "$staging/"
Expand Down

0 comments on commit f006dd0

Please sign in to comment.