Skip to content

Commit

Permalink
[GitHub Actions] Upload source tarball to GitHub Releases
Browse files Browse the repository at this point in the history
  • Loading branch information
past-due committed Feb 25, 2020
1 parent 5e1240d commit ab06926
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/CI_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,22 @@ jobs:
run: docker run --rm -e "CI=true" -e GITHUB_WORKFLOW -e GITHUB_ACTIONS -e GITHUB_REPOSITORY -e "GITHUB_WORKSPACE=/code" -e GITHUB_SHA -e GITHUB_REF -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e MAKEFLAGS -v $(pwd):/code ubuntu cmake '-H.' -Bbuild -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWZ_ENABLE_WARNINGS:BOOL=ON -G"Ninja"
- name: CMake Build
run: docker run --rm -e "CI=true" -e GITHUB_WORKFLOW -e GITHUB_ACTIONS -e GITHUB_REPOSITORY -e "GITHUB_WORKSPACE=/code" -e GITHUB_SHA -e GITHUB_REF -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e MAKEFLAGS -v $(pwd):/code ubuntu cmake --build build

upload_release_artifacts:
if: startsWith(github.ref, 'refs/tags/')
name: Upload Release Artifacts
needs: package-source
runs-on: ubuntu-latest
steps:
- name: Download source tarball
uses: actions/download-artifact@v1
with:
name: warzone2100_src
- name: Upload source tarball to release
uses: past-due/action-gh-release@v1
with:
# Do not explicitly specify a tag_name, so this action takes the github.ref and parses it for just the tag
files: ./warzone2100_src/warzone2100_src.tar.xz
draft: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit ab06926

Please sign in to comment.