Skip to content

Commit

Permalink
chore(ci): add production release script (#1154)
Browse files Browse the repository at this point in the history
  • Loading branch information
liamdebeasi committed Nov 18, 2022
1 parent 3bb4ba9 commit 1b98f9d
Showing 1 changed file with 54 additions and 2 deletions.
56 changes: 54 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,61 @@ name: 'Ionicons Production Release'

on:
workflow_dispatch:
inputs:
version:
required: true
type: choice
description: Which version should be published?
options:
- patch
- minor
- major
tag:
required: true
type: choice
description: Which npm tag should this be published to?
options:
- latest

jobs:
create-dev-hash:
release-ionicons:
uses: ./.github/workflows/release-ionicons.yml
with:
tag: ${{ inputs.tag }}
version: ${{ inputs.version }}
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

finalize-release:
needs: [release-ionicons]
runs-on: ubuntu-latest
steps:
- run: echo stub
- uses: actions/checkout@v3
with:
token: ${{ secrets.IONITRON_TOKEN }}
fetch-depth: 0
- name: Configure Identity
# Commits from github-actions do not
# trigger other GitHub Actions. As a result,
# we publish releases from Ionitron instead
# so actions run when merging the release branch
# back into main.
run: |
git config user.name ionitron
git config user.email hi@ionicframework.com
shell: bash
- name: Create GitHub Release
run: lerna version ${{ inputs.version }} --yes --force-publish='*' --conventional-commits --create-release github
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
# Lerna does not automatically bump versions
# of Ionicons dependencies that have changed,
# so we do that here.
- name: Bump Package Lock
run: |
lerna exec "npm install --package-lock-only --legacy-peer-deps"
git add .
git commit -m "chore(): update package lock files"
git push
shell: bash

0 comments on commit 1b98f9d

Please sign in to comment.