waforth/.github/workflows/publish-standalone.yml
2022-05-26 15:34:04 +02:00

34 lines
957 B
YAML

name: Publish Standalone
on:
release:
types: [created]
jobs:
build:
uses: ./.github/workflows/build.yml
publish-standalone:
needs: build
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/setup
- run: make -C src/standalone install-deps package
- run: |
echo "$EVENT"
for f in src/standalone/waforth-*.tgz; do
curl \
-H "Authorization: token $GITHUB_TOKEN" \
-H "Content-Type: $(file -b --mime-type $f)" \
--data-binary @$f \
"https://uploads.github.com/repos/remko/waforth/releases/$RELEASE_ID/assets?name=$(basename $f)"
done
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_ID: ${{ github.event.release.release_id }}
EVENT: ${{ toJSON(github.event) }}