run action and cache #8
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
tags: | |
- 'v*' | |
permissions: | |
contents: write | |
env: | |
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" | |
name: build | |
jobs: | |
build: | |
name: Build Koka | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macOS-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: freckle/stack-action@v5 | |
with: | |
test: false | |
stack-build-arguments: "" | |
cache-save-always: true | |
- name: Build | |
run: stack build | |
- name: Export GitHub Actions cache environment variables | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); | |
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); | |
- name: Run Koka Packaging | |
run: | | |
stack exec koka -- -e -O2 util/bundle | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
bundle/**/*.tar.gz | |
make_latest: true |