Support build_web_compilers #11
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
# This triggers whenever a tagged release is pushed | |
name: Compile Assets and Create Draft Release | |
on: | |
push: | |
tags: | |
# Trigger on sqlite_async tags | |
- 'sqlite_async-v*' | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write # Needed to create releases | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Need to fetch the tags | |
- uses: dart-lang/setup-dart@v1 | |
- name: Install Melos | |
run: dart pub global activate melos | |
- name: Install dependencies | |
run: melos prepare | |
- name: Set tag name | |
id: tag | |
run: | | |
tag=$(basename "${{ github.ref }}") | |
echo "tag=$tag" >> $GITHUB_OUTPUT | |
- name: Create Release | |
env: | |
GH_TOKEN: ${{ github.token }} | |
GH_REPO: ${{ github.repository }} | |
run: | | |
tag="${{ steps.tag.outputs.tag }}" | |
body="Release $tag" | |
gh release create --draft "$tag" --title "$tag" --notes "$body" | |
- name: Upload Worker | |
env: | |
GH_TOKEN: ${{ github.token }} | |
GH_REPO: ${{ github.repository }} | |
run: | | |
gh release upload "${{ steps.tag.outputs.tag }}" assets/db_worker.js |