Skip to content

Commit

Permalink
ci: canary action
Browse files Browse the repository at this point in the history
  • Loading branch information
jxom committed Mar 1, 2024
1 parent 5c2128b commit dd3578f
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release (Canary)
on:
workflow_dispatch:

jobs:
canary:
name: Release canary
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: Clone repository
uses: actions/checkout@v4

- name: Install dependencies
uses: ./.github/actions/install-dependencies

- name: Setup .npmrc file
uses: actions/setup-node@v4
with:
registry-url: 'https://registry.npmjs.org'

- name: Set version
run: |
cd src
npm --no-git-tag-version version $(npm pkg get version | sed 's/"//g')-$(git branch --show-current | tr -cs '[:alnum:]-' '-' | tr '[:upper:]' '[:lower:]' | sed 's/-$//').$(date +'%Y%m%dT%H%M%S')
cd ../create-frog
npm --no-git-tag-version version $(npm pkg get version | sed 's/"//g')-$(git branch --show-current | tr -cs '[:alnum:]-' '-' | tr '[:upper:]' '[:lower:]' | sed 's/-$//').$(date +'%Y%m%dT%H%M%S')
bun ../.scripts/postversion.ts
- name: Build
run: pnpm build

- name: Publish to npm
run: |
cd src
npm publish --tag $(git branch --show-current | tr -cs '[:alnum:]-' '-' | tr '[:upper:]' '[:lower:]' | sed 's/-$//')
cd ../create-frog
npm publish --tag $(git branch --show-current | tr -cs '[:alnum:]-' '-' | tr '[:upper:]' '[:lower:]' | sed 's/-$//')
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit dd3578f

Please sign in to comment.