Add directory prefix to linux tar.gz build

Archives are a bit nicer to work with if they unpack into a single
directory instead of putting all the contents separately in the
current working directory. A common convention is for an archive like
`archive-version-os.tar.gz` to unpack into a directory of the same
name: `archive-version-os/`.
This commit is contained in:
Emil Lundberg 2022-11-11 15:18:47 +01:00
parent df4f853ca5
commit 371dbafb7a
No known key found for this signature in database
GPG Key ID: 0F47E61493A9B8E5

View File

@ -84,8 +84,10 @@ jobs:
- name: Rename and archive app - name: Rename and archive app
run: | run: |
export REF=$(echo ${GITHUB_REF} | cut -d '/' -f 3) export REF=$(echo ${GITHUB_REF} | cut -d '/' -f 3)
export BASENAME="yubioath-desktop-${REF}-linux"
mkdir deploy mkdir deploy
tar -czf deploy/yubioath-desktop-${REF}-linux.tar.gz -C build/linux/x64/release/bundle . mv build/linux/x64/release/bundle "build/${BASENAME}"
tar -czf deploy/${BASENAME}.tar.gz -C build "${BASENAME}"
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3