diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml
index 096f80d..db20887 100644
--- a/.github/workflows/maven-publish.yml
+++ b/.github/workflows/maven-publish.yml
@@ -1,23 +1,23 @@
# This workflow will build a Java project with Maven
-name: Build and publish schemas with Maven
+name: Zip and publish wsdl and schemas with Maven
on:
release:
types: [ created ]
jobs:
- build-and-publish:
- name: Build and publish code
+ package-and-publish:
+ name: Package and publish
runs-on: ubuntu-latest
steps:
- name: Checkout main repository
uses: actions/checkout@v3
- - name: Clean with Maven
- run: mvn clean
+ - name: Clean and package with Maven
+ run: mvn clean package
- name: Run publish with Maven
env:
GITHUB_USERNAME: x-access-token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run:
- mvn --settings deploy-settings.xml deploy
+ mvn --settings deploy-settings.xml deploy -Dfile=target/*.zip
diff --git a/.github/workflows/publish-artifact.yml b/.github/workflows/publish-artifact.yml
deleted file mode 100644
index 134727f..0000000
--- a/.github/workflows/publish-artifact.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-# Publish GitHub artifacts
-name: Publish Artifact
-
-on:
- workflow_dispatch:
-
-jobs:
-
- archive-build-artifacts:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout main repository
- uses: actions/checkout@v3
-
- - name: Step 1 - Create a temporary artifact temp folder
- run: mkdir -p temp
-
- - name: step 2 - Add artifacts to publish to the temp folder
- run: |
- cp -r ./src/ temp
-
- - name: Step 3 - Use the Upload Artifact GitHub Action
- uses: actions/upload-artifact@v3.1.2
- with:
- name: ctr-schemas
- path: temp
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..9f81406
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+# ignore target folder
+target
diff --git a/README.md b/README.md
index 2cc7fed..64cff22 100644
--- a/README.md
+++ b/README.md
@@ -2,5 +2,14 @@
Contains the schemas and wsdl file used in the CTR project for the new DGWS interface
+## Build
+
+Run mvn clean package to create a zip file of the wsdl and schema files in ctr-schemas repo. The zip file is located in the target folder.
+
+## Upload zip file to Github
+
+When creating a release in Github of this project, the Github action workflow will automatically create a zip file and upload it to the Github packages.
+
+Find it [here](https://github.com/trifork/ctr-schemas/packages/1787197)
+
-Create a zip file of the wsdl and schema files in ctr-schemas repo, and upload the zip file to the Github artifacts
diff --git a/pom.xml b/pom.xml
index 14d03d3..dd0c40a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,6 +7,9 @@
dk.lmst.ctr
ctr-schemas
1.0-SNAPSHOT
+ ctr-schemas
+ CTR schemas
+ pom
@@ -15,5 +18,28 @@
https://maven.pkg.github.com/trifork/ctr-schemas
+
+
+
+
+ org.apache.maven.plugins
+ maven-assembly-plugin
+
+
+ resources
+
+ single
+
+ package
+
+
+ /src/main/assembly/resources.xml
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/assembly/resources.xml b/src/main/assembly/resources.xml
new file mode 100644
index 0000000..60fdb3e
--- /dev/null
+++ b/src/main/assembly/resources.xml
@@ -0,0 +1,19 @@
+
+
+ src
+
+ zip
+
+ false
+
+
+
+ ${project.basedir}/src
+
+ **/main/**
+
+
+
+
\ No newline at end of file