.github/workflows/khronos-binaries.yml
name: Khronos Binaries
on:
push:
tags:
- "b*"
jobs:
release-binaries:
name: Release
runs-on: ubuntu-latest
steps:
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/b}
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- name: NPM install
run: npm install
- name: Build script
run: node build.binaries.mjs
- name: Read build description
id: build_description
run: |
content=`cat ./build.txt`
# handle multi-line content
content="${content//'%'/'%25'}"
content="${content//$'\n'/'%0A'}"
content="${content//$'\r'/'%0D'}"
# end of handle multi-line content
echo "::set-output name=DESCRIPTION::$content"
- name: Release
uses: softprops/action-gh-release@v1
# if: startsWith(github.ref, 'refs/tags/')
with:
files: build/*
name: Khronos binaries ${{ steps.get_version.outputs.VERSION }}
body: |
Khronos SPIRV-Tools binaries ${{ steps.get_version.outputs.VERSION }}
${{ steps.build_description.outputs.DESCRIPTION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}