diff options
author | Jens Peters <jp7677@gmail.com> | 2022-04-03 11:03:49 +0300 |
---|---|---|
committer | Jens Peters <jp7677@gmail.com> | 2022-04-07 23:11:10 +0300 |
commit | 9bfa5ea744233d5177d614ae823b7173fa9d6366 (patch) | |
tree | 2dcd1dd541d53b9ad98fbdea393707cd1809fbd9 | |
parent | 17192ccb2ec740121fcdea706e306ffe841c81c8 (diff) |
github: Create and upload tarball for tagsworkflow-create-release-tarball
-rw-r--r-- | .github/workflows/artifacts.yml | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/.github/workflows/artifacts.yml b/.github/workflows/artifacts.yml index ff3f15d..ae9f040 100644 --- a/.github/workflows/artifacts.yml +++ b/.github/workflows/artifacts.yml @@ -19,20 +19,24 @@ jobs: submodules: recursive fetch-depth: 0 - - name: Prepare version name + - name: Prepare environment (none-tag) + if: github.ref_type != 'tag' run: | - if ${{ github.ref_type == 'tag' }}; then - export VERSION=$(git describe --always --tags --dirty=+) - else - export VERSION="${GITHUB_REF##*/}-${GITHUB_SHA##*/}" - fi - echo "Version name: ${VERSION}" + export VERSION="${GITHUB_REF##*/}-${GITHUB_SHA##*/}" echo "VERSION=${VERSION}" >> $GITHUB_ENV + echo "ARTIFACT=build/dxvk-nvapi-${VERSION}" >> $GITHUB_ENV + + - name: Prepare environment (tag) + if: github.ref_type == 'tag' + run: | + export VERSION=$(git describe --always --tags --dirty=+) + echo "VERSION=${VERSION}" >> $GITHUB_ENV + echo "ARTIFACT=dxvk-nvapi-${VERSION}.tar.gz" >> $GITHUB_ENV - name: Setup problem matcher uses: Joshua-Ashton/gcc-problem-matcher@v1 - - name: Build release and run unit tests + - name: Build and run unit tests uses: Joshua-Ashton/arch-mingw-github-action@v7 with: command: | @@ -45,9 +49,13 @@ jobs: if: success() || failure() run: cat tests.log + - name: Create tarball + if: github.ref_type == 'tag' + run: tar cvfz "dxvk-nvapi-${{ env.VERSION }}.tar.gz" -C "./build/dxvk-nvapi-${{ env.VERSION }}" . + - name: Upload artifacts uses: actions/upload-artifact@v3 with: name: dxvk-nvapi-${{ env.VERSION }} - path: build/dxvk-nvapi-${{ env.VERSION }} + path: ${{ env.ARTIFACT }} if-no-files-found: error |