Skip to content

Commit

Permalink
Update release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
HippocampusGirl committed Aug 31, 2022
1 parent 87203d5 commit 4786213
Showing 1 changed file with 16 additions and 20 deletions.
36 changes: 16 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}

0 comments on commit 4786213

Please sign in to comment.