From fa1430b604ded0228931c9bc6fb2195ffa548662 Mon Sep 17 00:00:00 2001 From: spvkgn Date: Thu, 7 Nov 2024 16:32:01 +0500 Subject: [PATCH] github: set env variable for directory name --- .github/workflows/build.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3a91698..b798237 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -288,17 +288,19 @@ jobs: permissions: contents: write runs-on: ubuntu-latest + env: + repo_dir: zapret-${{ github.ref_name }} steps: - name: Checkout uses: actions/checkout@v4 with: - path: zapret + path: ${{ env.repo_dir }} - name: Download artifacts uses: actions/download-artifact@v4 id: bins with: - path: zapret/binaries + path: ${{ env.repo_dir }}/binaries pattern: zapret-* - name: Install upx @@ -360,11 +362,9 @@ jobs: - name: Create release bundles run: | - rm -rf zapret/.git* - rm -rf zapret-${{ github.ref_name }} - cp -R zapret zapret-${{ github.ref_name }} - tar -czf zapret-${{ github.ref_name }}.tar.gz zapret-${{ github.ref_name }} - zip -qr zapret-${{ github.ref_name }}.zip zapret-${{ github.ref_name }} + rm -rf ${{ env.repo_dir }}/.git* + tar -czf ${{ env.repo_dir }}.tar.gz ${{ env.repo_dir }} + zip -qr ${{ env.repo_dir }}.zip ${{ env.repo_dir }} - name: Upload release assets uses: softprops/action-gh-release@v2