Skip to content

Commit

Permalink
merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
antonin77 committed Feb 6, 2025
2 parents 13c4f8d + fdb8136 commit 14cce81
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 75 deletions.
49 changes: 0 additions & 49 deletions .github/workflows/demo.yml
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
39 changes: 15 additions & 24 deletions .github/workflows/main.yml
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 }}
58 changes: 58 additions & 0 deletions .github/workflows/release.yml
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 }}
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"build-all": "ng build \"@oneteme/jquery-core\" && npm run build \"@oneteme/jquery-apexcharts\" && ng build",
"build": "ng build \"@oneteme/jquery-core\" && ng build \"@oneteme/jquery-apexcharts\" && ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"
},
Expand Down

0 comments on commit 14cce81

Please sign in to comment.