Skip to content

🏷️ Release

🏷️ Release #40

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
- name: '🔺️ Cache'
uses: ./.github/actions/cache
- name: '📦 Install'
uses: ./.github/actions/install
- name: '🏗️ Build'
uses: ./.github/actions/build
with:
COMMAND: '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
- name: '🔺️ Cache'
uses: ./.github/actions/cache
- name: '📦 Install'
uses: ./.github/actions/install
- name: '🏗️ Build'
uses: ./.github/actions/build
with:
COMMAND: '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, 🥳️ LGTM'
github_token: ${{ secrets.GITHUB_TOKEN }}
head: release/${{ needs.create-release.outputs.version }}
base: main