Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 25 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ on:
jobs:
build:
name: Publish binaries
runs-on: windows-latest
strategy:
matrix:
kind: ['windows']
include:
- kind: windows
os: windows-latest
target: win-x64
runs-on: ${{ matrix.os }}

steps:
- name: Setup Developer Command Prompt
Expand All @@ -28,24 +35,23 @@ jobs:
working-directory: ${{env.GITHUB_WORKSPACE}}
run: bin.ntx64\jam.exe -v

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
- name: Package
shell: bash
working-directory: ${{env.GITHUB_WORKSPACE}}
run: |
tag=$(git describe --tags --abbrev=0)
release_name="jam-$tag-${{ matrix.target }}"

# Pack files
if [ "${{ matrix.target }}" == "win-x64" ]; then
7z a -tzip "${release_name}.zip" "./bin.ntx64/jam.exe"
else
tar czvf "${release_name}.tar.gz" "bin.ntx64/jam"
fi

- name: Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./bin.ntx64/jam.exe
asset_name: jam.exe (Windows x64)
asset_content_type: application/octet-stream
files: "jam-*"