Skip to content

Commit

Permalink
chore: alpha release script
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesLMilner committed Jul 16, 2023
1 parent 6e30fda commit 7b743ab
Show file tree
Hide file tree
Showing 5 changed files with 110 additions and 104 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/alpha-release.yml
@@ -0,0 +1,51 @@
name: Alpha Release

permissions:
contents: write

on: workflow_dispatch

jobs:
release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: "18.x"
registry-url: "https://registry.npmjs.org"

- name: Install
run: npm ci

- name: Update Docs
run: npm run docs

- name: Run build
run: npm run build

- name: Get next version
run: echo "NEXT=0.0.1-alpha.$(echo $(npm run release:alpha:next | tail -n 1))" >> $GITHUB_ENV

- name: Print next version
run: echo ${{ env.NEXT }}

- name: Set git credentials
run: |
git config --global user.email "terradraw@githubactions.com"
git config --global user.name "James Milner"
- name: Release
run: npm run release -- --prerelease --release-as $(echo ${{ env.NEXT }})

- name: Echo upstream remote
run: git remote -v

- name: Push upstream
run: git push origin main --tags

- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
@@ -1,5 +1,8 @@
name: CI

permissions:
contents: read

on:
push:
branches: [main]
Expand Down

0 comments on commit 7b743ab

Please sign in to comment.