From 2d88c393f950ba31115558942c4acf85154ab3a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Hrastnik?= Date: Tue, 11 May 2021 18:50:02 +0900 Subject: [PATCH] Update workflows. --- .github/workflows/{rust.yml => build.yml} | 0 .github/workflows/release.yml | 34 ++++++++++++++++------- 2 files changed, 24 insertions(+), 10 deletions(-) rename .github/workflows/{rust.yml => build.yml} (100%) diff --git a/.github/workflows/rust.yml b/.github/workflows/build.yml similarity index 100% rename from .github/workflows/rust.yml rename to .github/workflows/build.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c4bef4b9f..f8fd14dfa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -86,14 +86,23 @@ jobs: aarch64-linux-gnu-strip \ /target/${{ matrix.target }}/release/hx + - name: Calculate tag name + run: | + name=dev + if [[ $GITHUB_REF == refs/tags/v* ]]; then + name=${GITHUB_REF:10} + fi + echo ::set-output name=val::$name + echo TAG=$name >> $GITHUB_ENV + id: tagname + - name: Build archive shell: bash run: | # outdir="$(ci/cargo-out-dir "${{ env.TARGET_DIR }}")" staging="helix-${{ env.RELEASE_VERSION }}-${{ matrix.target }}" mkdir "$staging" - cp README.md "$staging/" - # cp {README.md,LICENSE} "$staging/" + cp {README.md,LICENSE} "$staging/" # cp {CHANGELOG.md,FAQ.md,GUIDE.md} "$staging/doc/" # cp "$outdir"/{hx.bash,hx.fish,_hx.ps1} "$staging/complete/" # cp complete/_hx "$staging/complete/" @@ -112,7 +121,7 @@ jobs: # package - uses: actions/upload-artifact@v1 with: - name: bins-${{ matrix.build }} + name: tarballs-${{ matrix.build }} path: ${{ env.ASSET }} publish: @@ -120,21 +129,26 @@ jobs: needs: [dist] runs-on: ubuntu-latest steps: - - name: Checkout sources - uses: actions/checkout@v2 - with: - submodules: false - - uses: actions/download-artifact@v2 with: path: dist - run: ls -al ./dist + - name: Calculate tag name + run: | + name=dev + if [[ $GITHUB_REF == refs/tags/v* ]]; then + name=${GITHUB_REF:10} + fi + echo ::set-output name=val::$name + echo TAG=$name >> $GITHUB_ENV + id: tagname + - name: Upload binaries to release uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: dist/* + file: dist/**/* file_glob: true - tag: ${{ github.ref }} + tag: ${{ steps.tagname.outputs.val }} overwrite: true