-
Notifications
You must be signed in to change notification settings - Fork 795
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): publish dev builds in ci (#4095)
this commit adds a new job for the purposes of building development versions of stencil, and deploying it to the npm registry it uses stencil's new build id and version metadata generation to publish a version of stencil with that metadata to the npm registry this commit does _not_ go through the typical `npm run release` scripts. while that work is planned in the future, there's still much to be done in order for ci to take advantage of them.
- Loading branch information
1 parent
30cb603
commit 33567aa
Showing
3 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: 'Release' | ||
description: 'Releases Stencil Core' | ||
inputs: | ||
version: | ||
description: 'The type of version to release.' | ||
tag: | ||
description: 'The tag to publish to on NPM.' | ||
token: | ||
description: 'The NPM authentication token required to publish.' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 | ||
|
||
- name: Get Core Dependencies | ||
uses: ./.github/workflows/actions/get-core-dependencies | ||
|
||
- name: Download Build Archive | ||
uses: ./.github/workflows/actions/download-archive | ||
with: | ||
name: stencil-core | ||
path: . | ||
filename: stencil-core-build.zip | ||
|
||
- name: Set Version | ||
run: npm version --no-git-tag-version ${{ inputs.version }} | ||
shell: bash | ||
|
||
- name: Prepare NPM Token | ||
run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc | ||
shell: bash | ||
env: | ||
NPM_TOKEN: ${{ inputs.token }} | ||
|
||
- name: Publish to NPM | ||
run: npm publish --tag ${{ inputs.tag }} | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: 'Stencil Dev Release' | ||
|
||
on: | ||
workflow_dispatch: | ||
# Make this a reusable workflow, no value needed | ||
# https://docs.github.com/en/actions/using-workflows/reusing-workflows | ||
|
||
jobs: | ||
build_core: | ||
name: Build | ||
uses: ./.github/workflows/build.yml | ||
|
||
get-dev-version: | ||
name: Get Dev Build Version | ||
needs: [build_core] | ||
runs-on: ubuntu-20.04 | ||
outputs: | ||
dev-version: ${{ steps.get-dev-version.outputs.DEV_VERSION }} | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 | ||
|
||
- name: Get Core Dependencies | ||
uses: ./.github/workflows/actions/get-core-dependencies | ||
|
||
- name: Download Build Archive | ||
uses: ./.github/workflows/actions/download-archive | ||
with: | ||
name: stencil-core | ||
path: . | ||
filename: stencil-core-build.zip | ||
|
||
- name: Get Version | ||
id: get-dev-version | ||
run: | | ||
# A unique string to publish Stencil under | ||
# e.g. "3.0.1-dev.1677185104.7c87e34" | ||
# | ||
# Pull this value from the compiled artifacts | ||
DEV_VERSION=$(./bin/stencil version) | ||
echo "Using version $DEV_VERSION" | ||
# store a key/value pair in GITHUB_OUTPUT | ||
# e.g. "DEV_VERSION=3.0.1-dev.1677185104.7c87e34" | ||
echo "DEV_VERSION=$DEV_VERSION" >> $GITHUB_OUTPUT | ||
shell: bash | ||
|
||
release-stencil-dev-build: | ||
name: Publish Dev Build | ||
needs: [get-dev-version, build_core] | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 | ||
- uses: ./.github/workflows/actions/publish-npm | ||
with: | ||
tag: dev | ||
version: ${{ needs.get-dev-version.outputs.dev-version }} | ||
token: ${{ secrets.NPM_TOKEN }} |