-
Notifications
You must be signed in to change notification settings - Fork 0
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
8 changed files
with
142 additions
and
93 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,28 @@ | ||
name: Build Check on PR | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- v2 | ||
- v2-develop | ||
- alpha | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20.5.0' | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Run build | ||
run: npm run build |
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,39 @@ | ||
name: Manual NPM publish | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version_tag: | ||
description: 'Version tag' | ||
required: true | ||
|
||
concurrency: | ||
group: "release" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '20.5.0' | ||
registry-url: 'https://registry.npmjs.org/' | ||
|
||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.inputs.version_tag }} | ||
|
||
- name: Install Dependencies | ||
run: npm ci | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: NPM publish | ||
run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }} |
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,5 +1,8 @@ | ||
name: Release | ||
|
||
env: | ||
LIBRARY_NAME: "gisce/powerp.js" | ||
|
||
on: | ||
push: | ||
branches: | ||
|
@@ -8,21 +11,29 @@ on: | |
- alpha | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: "release" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
outputs: | ||
release_type: ${{ steps.get_release_type.outputs.release_type }} | ||
tag_name: ${{ steps.get_tag_name.outputs.tag_name }} | ||
branch_name: ${{ steps.get_branch_name.outputs.branch_name }} | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '20.5.0' | ||
|
||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Install Dependencies | ||
run: npm ci | ||
|
||
|
@@ -31,3 +42,52 @@ jobs: | |
GITHUB_TOKEN: ${{ secrets.GH_PAT }} | ||
NPM_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }} | ||
run: npx semantic-release | ||
|
||
- name: Capture Release Type | ||
id: get_release_type | ||
run: | | ||
if [ -f ".release-type" ]; then | ||
release_type=$(cat .release-type) | ||
echo "release_type=$release_type" >> $GITHUB_OUTPUT | ||
else | ||
echo "release_type=none" >> $GITHUB_OUTPUT | ||
fi | ||
shell: bash | ||
|
||
- name: Capture Tag Name | ||
id: get_tag_name | ||
run: | | ||
if [ -f ".release-tag" ]; then | ||
tag_name=$(cat .release-tag) | ||
echo "tag_name=$tag_name" >> $GITHUB_OUTPUT | ||
else | ||
echo "tag_name=none" >> $GITHUB_OUTPUT | ||
fi | ||
shell: bash | ||
|
||
- name: Capture Branch Name | ||
id: get_branch_name | ||
run: echo "branch_name=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT | ||
shell: bash | ||
|
||
update-dependents: | ||
name: Update dependent projects | ||
needs: release | ||
if: needs.release.outputs.release_type != 'none' | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- project: "gisce/webclient" | ||
# modify this in case that branches are not equivalent and exist between projects | ||
branch: ${{ needs.release.outputs.branch_name }} | ||
steps: | ||
- name: Call update version dependency flow for each project | ||
uses: gisce/[email protected] | ||
with: | ||
dependentProject: ${{ matrix.project }} | ||
tagName: ${{ needs.release.outputs.tag_name }} | ||
dependentProjectBranch: ${{ matrix.branch }} | ||
libraryName: ${{ env.LIBRARY_NAME }} | ||
githubToken: ${{ secrets.GH_PAT }} | ||
releaseType: ${{ needs.release.outputs.release_type }} |
This file was deleted.
Oops, something went wrong.
28 changes: 0 additions & 28 deletions
28
.github/workflows/update_dependent_projects_v2-develop.yaml
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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