Skip to content

Commit

Permalink
Zip schema and wsdl (#9)
Browse files Browse the repository at this point in the history
* zip schema and wsdl in pom

* zip schemas and wsdl files

* only zip

* dont zip main/assembly dir
  • Loading branch information
hmmtrifork authored Feb 12, 2023
1 parent 165b951 commit 88fea98
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 33 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
@@ -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
26 changes: 0 additions & 26 deletions .github/workflows/publish-artifact.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# ignore target folder
target
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
26 changes: 26 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
<groupId>dk.lmst.ctr</groupId>
<artifactId>ctr-schemas</artifactId>
<version>1.0-SNAPSHOT</version>
<name>ctr-schemas</name>
<description>CTR schemas</description>
<packaging>pom</packaging>

<distributionManagement>
<repository>
Expand All @@ -15,5 +18,28 @@
<url>https://maven.pkg.github.com/trifork/ctr-schemas</url>
</repository>
</distributionManagement>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>resources</id>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
<configuration>
<descriptors>
<descriptor>/src/main/assembly/resources.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
19 changes: 19 additions & 0 deletions src/main/assembly/resources.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.1 https://maven.apache.org/xsd/assembly-2.1.1.xsd">

<id>src</id>
<formats>
<format>zip</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>

<fileSets>
<fileSet>
<directory>${project.basedir}/src</directory>
<excludes>
<exclude>**/main/**</exclude>
</excludes>
</fileSet>
</fileSets>
</assembly>

0 comments on commit 88fea98

Please # to comment.