diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3aa0220..49ebedb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,6 +35,8 @@ jobs: - name: Install dependencies shell: bash run: | + apt update + apt install -y zip pip install --upgrade pip pip install . conda install -c conda-forge -y hub @@ -44,25 +46,19 @@ jobs: shell: bash run: | set -x - ATLAS_DIR=/tmp/atlases - CWD=$(pwd) - mkdir -p ${ATLAS_DIR} - cd ${ATLAS_DIR} + + output_path=/tmp/halfpipe-atlases + mkdir -p ${output_path} + cd ${output_path} halfpipe-atlases-build - cd ${CWD} - echo "::set-output name=atlas_dir::${ATLAS_DIR}" - - name: Create release - shell: bash - env: - ATLAS_DIR: ${{ steps.build_atlases.outputs.atlas_dir }} - GITHUB_REF: ${{ github.ref }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions - run: | - set -x - ASSETS=() - for ASSET in ${ATLAS_DIR}/*; do - ASSETS+=("-a" "${ASSET}") - done - VERSION=$(echo "${GITHUB_REF}" | cut -d '/' -f 3) - hub release create "${ASSETS[@]}" -m "Release ${VERSION}" "${VERSION}" + zip_path=${output_path}.zip + zip ${zip_path} * + + echo "::set-output name=zip_path::${zip_path}" + + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: ${{ steps.build_atlases.outputs.zip_path }}