Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .github/workflows/actions/publish-npm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,9 @@ inputs:
folder:
default: './'
description: 'A folder containing a package.json file.'
token:
description: 'The NPM authentication token required to publish.'

createRelease:
description: 'Create a release on GitHub.'
default: 'false'

ghToken:
description: 'The GitHub authentication token required to create a release.'

Expand Down Expand Up @@ -49,12 +45,6 @@ runs:
run: npm run build
shell: bash
working-directory: ${{ inputs.working-directory }}
- name: Prepare NPM Token
run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc
working-directory: ${{ inputs.working-directory }}
shell: bash
env:
NPM_TOKEN: ${{ inputs.token }}
- name: Publish to NPM
run: npm publish ${{ inputs.folder }} --tag ${{ inputs.tag }} --provenance
shell: bash
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: 'Ionicons Dev Build'
name: 'Dev Release'

on:
workflow_dispatch:
workflow_call:

jobs:
create-dev-hash:
Expand Down Expand Up @@ -33,7 +33,6 @@ jobs:
tag: dev
version: ${{ needs.create-dev-hash.outputs.dev-hash }}
working-directory: './'
token: ${{ secrets.NPM_TOKEN }}
createRelease: 'false'

get-build:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
name: 'Ionicons Production Release'
name: 'Production Release'

on:
workflow_dispatch:
workflow_call:
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
required: false
type: string
description: npm version (major, minor, or patch)

jobs:
release-ionicons:
Expand All @@ -31,9 +21,8 @@ jobs:
- name: Publish to NPM
uses: ./.github/workflows/actions/publish-npm
with:
tag: ${{ inputs.tag }}
tag: latest
version: ${{ inputs.version }}
working-directory: './'
token: ${{ secrets.NPM_TOKEN }}
createRelease: true
ghToken: ${{ secrets.IONITRON_TOKEN }}
37 changes: 37 additions & 0 deletions .github/workflows/release-orchestrator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: 'Release Orchestrator'

on:
workflow_dispatch:
inputs:
release-type:
description: 'Release type'
required: true
type: choice
options:
- dev
- production
version:
description: 'Version for production releases'
required: false
type: choice
options:
- patch
- minor
- major

permissions:
id-token: write
contents: read

jobs:
run-dev:
if: ${{ inputs.release-type == 'dev' }}
uses: ./.github/workflows/dev-release.yml
secrets: inherit

run-production:
if: ${{ inputs.release-type == 'production' }}
uses: ./.github/workflows/production-release.yml
secrets: inherit
with:
version: ${{ inputs.version }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Ionicons Build'
name: 'Validation'

on:
pull_request:
Expand Down