-
Notifications
You must be signed in to change notification settings - Fork 1
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
4 changed files
with
74 additions
and
75 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 |
---|---|---|
@@ -1,49 +0,0 @@ | ||
name: deploy demo | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
sonarcloud: | ||
name: SonarCloud | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
- name: SonarCloud Scan | ||
uses: SonarSource/sonarcloud-github-action@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
deploy: | ||
needs: sonarcloud | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
- run: npm install | ||
- run: npm run build-all -- --base-href jquery-chart | ||
- uses: actions/configure-pages@v5 | ||
- uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: './dist/jquery-charts' | ||
- uses: actions/deploy-pages@v4 | ||
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,29 +1,20 @@ | ||
name: publish libraries | ||
name: CI/CD | ||
on: | ||
release: | ||
types: ["published"] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
pull_request: | ||
branches: main | ||
types: [opened, synchronize, reopened] | ||
push: | ||
branches: main | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
# Setup .npmrc file to publish to npm | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
scope: '@oneteme' | ||
- run: npm install | ||
- run: npm run build '@oneteme/jquery-core' | ||
- run: npm config ls | ||
- run: npm publish ./dist/oneteme/jquery-core --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- run: npm run build '@oneteme/jquery-apexcharts' | ||
- run: npm publish ./dist/oneteme/jquery-apexcharts --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- uses: oneteme/automation-scripts/.github/actions/sonar-npm-scan@main #see package.json: scripts.build | ||
env: | ||
SONAR_TOKEN: ${{ secrets.SONAR_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 |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: tag release | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
core: | ||
type: boolean | ||
description: deploy jquery-core library | ||
apexcharts: | ||
type: boolean | ||
description: deploy jquery-apexcharts library | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- uses: oneteme/automation-scripts/.github/actions/sonar-npm-scan@main | ||
env: | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
deploy: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
registry-url: 'https://registry.npmjs.org' | ||
scope: '@oneteme' | ||
- uses: oneteme/automation-scripts/.github/actions/npm-deploy@main | ||
if: ${{ inputs.core }} | ||
with: | ||
package: 'jqeury-core' | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- uses: oneteme/automation-scripts/.github/actions/npm-deploy@main | ||
if: ${{ inputs.apexcharts }} | ||
with: | ||
package: 'jqeury-apexcharts' | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- uses: oneteme/automation-scripts/.github/actions/npm-project-version@main | ||
id: prj_ver | ||
outputs: # take global project version | ||
version: ${{ steps.prj_ver.outputs.version }} | ||
release: | ||
needs: deploy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: oneteme/automation-scripts/.github/actions/create-release-notes@main | ||
with: | ||
version: ${{ needs.deploy.outputs.version }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_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