v0.6.1 #6
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
name: "New Release" | |
on: | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: select a tag | |
release: | |
types: | |
- published | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
upload-to-r2: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- uses: pnpm/action-setup@v3 | |
with: | |
version: 9 | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- uses: actions/cache@v4 | |
name: Setup pnpm cache | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- uses: actions/checkout@v4 | |
- name: Install | |
run: pnpm install --filter=overlayed-root | |
- name: Download draft binaries | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const { script } = await import('${{ github.workspace }}/scripts/actions/upload-to-r2.js') | |
const tag = "${{ github.event.inputs.tag }}" | |
if (tag) { | |
context.ref = tag | |
} | |
await script({ github, context }, "stable", ) | |
env: | |
# NOTE: we need this to download the bins | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |