Skip to content

๐Ÿท๏ธ Release #48

๐Ÿท๏ธ Release

๐Ÿท๏ธ Release #48

Workflow file for this run

name: '๐Ÿท๏ธ Release'
on:
workflow_dispatch:
inputs:
type:
type: choice
description: 'SemVer Increment'
default: 'prerelease'
required: true
options:
- prerelease
- prepatch
- patch
- preminor
- minor
- premajor
- major
identifier:
type: choice
description: 'Version Prefix'
options:
- canary
jobs:
create-release:
name: '๐Ÿท๏ธ Create Release'
runs-on: ubuntu-latest
steps:
- name: '๐Ÿ™๏ธ Checkout'
uses: actions/checkout@v4
- name: '๐Ÿ’ฝ๏ธ Setup'
uses: ./.github/actions/setup-node
- name: '๐Ÿ”บ๏ธ Cache'
uses: ./.github/actions/cache-node
- name: '๐Ÿ“ฆ Install'
shell: bash
run: pnpm install --frozen-lockfile
- name: '๐Ÿ—๏ธ Build'
shell: bash
run: pnpm build
- name: '๐Ÿท๏ธ Release'
id: release
uses: ./.github/actions/release
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_TYPE: ${{ github.event.inputs.type }}
RELEASE_IDENTIFIER: ${{ github.event.inputs.identifier }}
outputs:
version: ${{ steps.release.outputs.version }}
tag: ${{ steps.release.outputs.tag }}
branch: ${{ steps.release.outputs.branch }}
publish:
name: '๐Ÿท๏ธ Publish'
runs-on: ubuntu-latest
needs: [create-release]
steps:
- name: '๐Ÿ™๏ธ Checkout'
uses: actions/checkout@v4
with:
ref: ${{ needs.create-release.outputs.branch }}
- name: '๐Ÿ’ฝ๏ธ Setup'
uses: ./.github/actions/setup-node
- name: '๐Ÿ”บ๏ธ Cache'
uses: ./.github/actions/cache-node
- name: '๐Ÿ“ฆ Install'
shell: bash
run: pnpm install --frozen-lockfile
- name: '๐Ÿ—๏ธ Build'
shell: bash
run: pnpm build
- name: '๐Ÿท๏ธ Publish @giantnodes/theme'
working-directory: packages/theme
shell: bash
run: |
pnpm publish --tag ${{ needs.create-release.outputs.tag }} --publish-branch ${{ needs.create-release.outputs.branch }} --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: '๐Ÿท๏ธ Publish @giantnodes/react'
working-directory: packages/react
shell: bash
run: |
pnpm publish --tag ${{ needs.create-release.outputs.tag }} --publish-branch ${{ needs.create-release.outputs.branch }} --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
pull-request:
name: '๐Ÿท๏ธ Open Pull Request'
runs-on: ubuntu-latest
needs: [create-release, publish]
steps:
- name: '๐Ÿ™๏ธ Checkout'
uses: actions/checkout@v4
with:
ref: ${{ needs.create-release.outputs.branch }}
- name: '๐Ÿท๏ธ Open Pull Request'
uses: thomaseizinger/create-pull-request@master
with:
title: 'chore(release): v${{ needs.create-release.outputs.version }}'
labels: '๐Ÿท๏ธ Release'
github_token: ${{ secrets.GITHUB_TOKEN }}
head: release/${{ needs.create-release.outputs.version }}
base: main