diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml
new file mode 100644
index 00000000..95efd8c8
--- /dev/null
+++ b/.github/workflows/maven-publish.yml
@@ -0,0 +1,33 @@
+# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
+# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path
+
+name: Maven Package
+
+on:
+ workflow_dispatch:
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+ permissions:
+ contents: read
+ packages: write
+
+ steps:
+ - uses: actions/checkout@v3
+ - name: Set up JDK 11
+ uses: actions/setup-java@v3
+ with:
+ java-version: '11'
+ distribution: 'temurin'
+ server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
+ settings-path: ${{ github.workspace }} # location for the settings.xml file
+
+ - name: Build with Maven
+ run: mvn -B package --file pw/pw-jwt-oauth/server/pom.xml
+
+ - name: Publish to GitHub Packages Apache Maven
+ run: cd pw/pw-jwt-oauth/server && mvn deploy -s $GITHUB_WORKSPACE/settings.xml
+ env:
+ GITHUB_TOKEN: ${{ github.token }}
diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml
new file mode 100644
index 00000000..c0966042
--- /dev/null
+++ b/.github/workflows/npm-publish.yml
@@ -0,0 +1,32 @@
+# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
+# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
+
+name: Node.js Package
+
+on:
+ workflow_dispatch:
+
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: actions/setup-node@v3
+ with:
+ node-version: 16
+ - run: cd pw/pw-jwt-oauth/client && npm ci
+
+ publish-npm:
+ needs: build
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: actions/setup-node@v3
+ with:
+ node-version: 16
+ registry-url: https://registry.npmjs.org/
+ - run: cd pw/pw-jwt-oauth/client && npm ci
+ - run: cd pw/pw-jwt-oauth/client && npm publish
+ env:
+ NODE_AUTH_TOKEN: ${{secrets.npm_token}}
diff --git a/pw/pw-jwt-oauth/client/package.json b/pw/pw-jwt-oauth/client/package.json
index 5b9af23d..20189826 100644
--- a/pw/pw-jwt-oauth/client/package.json
+++ b/pw/pw-jwt-oauth/client/package.json
@@ -1,6 +1,6 @@
{
"name": "secure-angular-training-app",
- "version": "0.0.0",
+ "version": "0.0.2",
"scripts": {
"ng": "ng",
"start": "ng serve",
@@ -8,7 +8,6 @@
"watch": "ng build --watch --configuration development",
"test": "ng test"
},
- "private": true,
"dependencies": {
"@angular/animations": "~13.0.0",
"@angular/common": "~13.0.0",
@@ -37,4 +36,4 @@
"karma-jasmine-html-reporter": "~1.7.0",
"typescript": "~4.4.3"
}
-}
\ No newline at end of file
+}
diff --git a/pw/pw-jwt-oauth/server/pom.xml b/pw/pw-jwt-oauth/server/pom.xml
index cf2a3b68..e5270cb8 100644
--- a/pw/pw-jwt-oauth/server/pom.xml
+++ b/pw/pw-jwt-oauth/server/pom.xml
@@ -9,12 +9,19 @@
- com.worldline.bookstore
+ nicob.nicolegrimpeur.bookstore
bookstore
0.0.1-SNAPSHOT
- war
Bookstore
+
+
+ github
+ GitHub Packages
+ https://maven.pkg.github.com/nicolegrimpeur/angular-security-training
+
+
+
3.0.0