Skip to content

Commit

Permalink
Refactor build stage and fix release
Browse files Browse the repository at this point in the history
Signed-off-by: Ismael González <[email protected]>
  • Loading branch information
ismaelgv committed Nov 6, 2021
1 parent fc68556 commit 79680f3
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,9 @@ jobs:
env:
VERSION: ${{ steps.version.outputs.version }}
run: |
workflow_dir=$(pwd) # Avoid ${GITHUB_WORKFLOW} since Windows mixes path styles.
package_name="${PROJECT_NAME}-${VERSION}-${TARGET}"
ext=".tag.gz"
deploy_dir="${BUILD_DIR}/${package_name}"
base_name="${PROJECT_NAME}-${VERSION}-${TARGET}"
package_name="${package_name}.tar.gz"
deploy_dir="${BUILD_DIR}/${base_name}"
# Create deployment directory
mkdir -p "${deploy_dir}"
Expand All @@ -96,12 +95,9 @@ jobs:
cp LICENSE "${deploy_dir}"
# Archive
pushd "${BUILD_DIR}"
tar czf "${workflow_dir}/${package_name}${ext}" "${package_name}"/*
popd
rm -r "${BUILD_DIR}"
tar czf "${package_name}" -C "${BUILD_DIR}" "${base_name}"/*
echo ::set-output name=name::${package_name}${ext}
echo ::set-output name=name::${package_name}
- name: Store artifacts
uses: actions/upload-artifact@v2
Expand Down Expand Up @@ -130,4 +126,4 @@ jobs:
uses: softprops/action-gh-release@v1
with:
name: ${{ steps.version.outputs.version }}
artifacts: "${{ env.ARTIFACT_NAME }}/*"
files: "${{ env.ARTIFACT_NAME }}/*"

0 comments on commit 79680f3

Please sign in to comment.