waforth/.github/workflows/publish-standalone.yml

36 lines
1.1 KiB
YAML
Raw Normal View History

2022-05-26 12:07:41 +02:00
name: Publish Standalone
on:
release:
types: [created]
jobs:
build:
uses: ./.github/workflows/build.yml
publish-standalone:
needs: build
strategy:
matrix:
2022-10-08 09:16:30 +02:00
os: [macos-latest, ubuntu-18.04, windows-latest]
2022-05-26 12:07:41 +02:00
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/setup
2022-06-10 20:22:57 +02:00
- run: make -C src/standalone install-deps package
- run: make -C src/standalone check
2022-05-26 17:00:38 +02:00
- name: "Upload artifacts"
run: |
for f in `find src/standalone -name 'waforth-*.tgz' -o -name 'waforth-*.zip'`; do
2022-05-26 17:00:38 +02:00
curl --fail \
2022-05-26 15:34:04 +02:00
-H "Authorization: token $GITHUB_TOKEN" \
-H "Content-Type: $(file -b --mime-type $f)" \
--data-binary @$f \
2022-05-26 17:00:38 +02:00
"$RELEASE_ASSETS_UPLOAD_URL?name=$(basename $f)"
2022-05-26 15:34:04 +02:00
done
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2022-05-26 17:00:38 +02:00
RELEASE_ASSETS_UPLOAD_URL: https://uploads.github.com/repos/${{ github.event.repository.full_name}}/releases/${{ github.event.release.id }}/assets
shell: bash
2022-05-26 15:34:04 +02:00