-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
88 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Publish Package to npmjs | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js 18.x | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '18.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
node_modules | ||
*/*/node_modules | ||
key: yarn-deps-${{ hashFiles('**/yarn.lock') }} | ||
|
||
- name: Install dependencies | ||
shell: bash | ||
run: yarn | ||
|
||
- name: Transpile to JavaScript | ||
shell: bash | ||
run: yarn transpile | ||
|
||
- run: npm publish --access=public | ||
shell: bash | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file was deleted.
Oops, something went wrong.
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,9 @@ | ||
name: publish npm | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
publish: | ||
uses: Think-iT-Labs/edc-connector-client/.github/actions/npm-publish@main | ||
secrets: inherit |
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,42 @@ | ||
name: release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'SemVer that will be used for publishing (e.g. "0.0.1")' | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
prepare-release: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Prepare ${{ inputs.version }} release | ||
run: | | ||
git config user.name "think-it-account" | ||
git config user.email "technical@think-it.io" | ||
sed -i 's/"version":.*/"version": "${{ inputs.version }}",/g' package.json | ||
git add . | ||
git commit -m "Prepare release ${{ inputs.version }}" | ||
git push origin main | ||
git tag --force v${{ inputs.version }} | ||
git push --force origin v${{ inputs.version }} | ||
- name: Create GitHub Release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
generateReleaseNotes: true | ||
tag: ${{ inputs.version }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
makeLatest: true | ||
removeArtifacts: true | ||
publish: | ||
needs: prepare-release | ||
uses: Think-iT-Labs/edc-connector-client/.github/actions/npm-publish@main | ||
secrets: inherit |
2 changes: 1 addition & 1 deletion
2
.github/workflows/pull-request-testing.yml → .github/workflows/test.yml
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Pull request testing | ||
name: test | ||
|
||
on: | ||
push: | ||
|
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