Skip to content

Commit 1b98f9d

Browse files
authored
chore(ci): add production release script (#1154)
1 parent 3bb4ba9 commit 1b98f9d

File tree

1 file changed

+54
-2
lines changed

1 file changed

+54
-2
lines changed

.github/workflows/release.yml

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,61 @@ name: 'Ionicons Production Release'
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
version:
7+
required: true
8+
type: choice
9+
description: Which version should be published?
10+
options:
11+
- patch
12+
- minor
13+
- major
14+
tag:
15+
required: true
16+
type: choice
17+
description: Which npm tag should this be published to?
18+
options:
19+
- latest
520

621
jobs:
7-
create-dev-hash:
22+
release-ionicons:
23+
uses: ./.github/workflows/release-ionicons.yml
24+
with:
25+
tag: ${{ inputs.tag }}
26+
version: ${{ inputs.version }}
27+
secrets:
28+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
29+
30+
finalize-release:
31+
needs: [release-ionicons]
832
runs-on: ubuntu-latest
933
steps:
10-
- run: echo stub
34+
- uses: actions/checkout@v3
35+
with:
36+
token: ${{ secrets.IONITRON_TOKEN }}
37+
fetch-depth: 0
38+
- name: Configure Identity
39+
# Commits from github-actions do not
40+
# trigger other GitHub Actions. As a result,
41+
# we publish releases from Ionitron instead
42+
# so actions run when merging the release branch
43+
# back into main.
44+
run: |
45+
git config user.name ionitron
46+
git config user.email [email protected]
47+
shell: bash
48+
- name: Create GitHub Release
49+
run: lerna version ${{ inputs.version }} --yes --force-publish='*' --conventional-commits --create-release github
50+
env:
51+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
shell: bash
53+
# Lerna does not automatically bump versions
54+
# of Ionicons dependencies that have changed,
55+
# so we do that here.
56+
- name: Bump Package Lock
57+
run: |
58+
lerna exec "npm install --package-lock-only --legacy-peer-deps"
59+
git add .
60+
git commit -m "chore(): update package lock files"
61+
git push
62+
shell: bash

0 commit comments

Comments
 (0)