Skip to content

Commit

Permalink
Adding configuration for upload of assets.
Browse files Browse the repository at this point in the history
  • Loading branch information
klakegg committed Nov 9, 2019
1 parent e930311 commit f04c65b
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 7 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/build.yml
Expand Up @@ -18,3 +18,46 @@ jobs:

- name: Build
run: make

- name: Package site files
run: cd target/site && zip -rq ../../site.zip *

- name: Upload validation artifact
uses: klakegg/github-upload@v0.9.1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: "target/validator/no.difi.ehf.postaward-${TAG}.asice"
label: "Validation artifacts for VEFA Validator 2.x"
type: "application/vnd.difi.validator.v2+zip"

- name: Upload examples files
uses: klakegg/github-upload@v0.9.1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: "target/examples.zip"
name: "ehf-postaward-g2-examples-${TAG}.zip"
label: "Example files"

- name: Upload Schematron files
uses: klakegg/github-upload@v0.9.1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: "target/schematron.zip"
name: "ehf-postaward-g2-schematron-${TAG}.zip"
label: "Schematron files"

- name: Upload site files
uses: klakegg/github-upload@v0.9.1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: "site.zip"
name: "ehf-postaward-g2-site-${TAG}.zip"
label: "Site files"
12 changes: 6 additions & 6 deletions rules/buildconfig.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<buildConfigurations xmlns="http://difi.no/xsd/vefa/validator/1.0">

<package url="http://vefa.difi.no/ehf/standard/ehf-catalogue-1.0.14/">EHF Catalogue 1.0.14</package>
<package url="http://vefa.difi.no/ehf/standard/ehf-despatch-advice-1.0.11/">EHF Despatch Advice 1.0.11</package>
<package url="http://vefa.difi.no/ehf/standard/ehf-invoice-and-creditnote-2.0.16/">EHF Invoice and Creditnote 2.0.16</package>
<package url="http://vefa.difi.no/ehf/standard/ehf-order-agreement-1.0.3/">EHF Order Agreement 1.0.3</package>
<package url="http://vefa.difi.no/ehf/standard/ehf-ordering-1.0.12/">EHF Ordering 1.0.12</package>
<package url="http://vefa.difi.no/ehf/standard/ehf-punch-out-1.0.2/">EHF Punch Out 1.0.2</package>
<package url="http://vefa.difi.no/ehf/standard/ehf-catalogue-1.0.15/">EHF Catalogue 1.0.15</package>
<package url="http://vefa.difi.no/ehf/standard/ehf-despatch-advice-1.0.12/">EHF Despatch Advice 1.0.12</package>
<package url="http://vefa.difi.no/ehf/standard/ehf-invoice-and-creditnote-2.0.17/">EHF Invoice and Creditnote 2.0.17</package>
<package url="http://vefa.difi.no/ehf/standard/ehf-order-agreement-1.0.4/">EHF Order Agreement 1.0.4</package>
<package url="http://vefa.difi.no/ehf/standard/ehf-ordering-1.0.13/">EHF Ordering 1.0.13</package>
<package url="http://vefa.difi.no/ehf/standard/ehf-punch-out-1.0.3/">EHF Punch Out 1.0.3</package>
<package url="http://vefa.difi.no/ehf/standard/ehf-reminder-1.1.0/">EHF Reminder 1.1.0</package>

</buildConfigurations>
3 changes: 2 additions & 1 deletion tools/ehf.makefile
Expand Up @@ -7,6 +7,7 @@ RELEASE := $(if $(RELEASE),$(RELEASE),Unofficial)
DOCS_FOLDER := $(if $(DOCS_FOLDER),$(DOCS_FOLDER),docs)
RULES_FOLDER := $(if $(RULES_FOLDER),$(RULES_FOLDER),rules)
RULES_IDENT := $(if $(RULES_IDENT),$(RULES_IDENT),rules)
VERSION := $(if $(GITHUB_REF),$(shell echo "$(GITHUB_REF)" | sed "s:.*/::g"),snapshot)
BUILD = structure example schematron xsd rules docs static
.DEFAULT_GOAL = default
define docker_pull
Expand Down Expand Up @@ -109,7 +110,7 @@ ifeq "$(RULE_RULES)" "true"
$(call docker_run,rules,Running vefa-validator,\
-v $(PROJECT):/src \
difi/vefa-validator \
build -x -t -n $(RULES_IDENT) -a $(RULES_FOLDER) -target target/validator /src)
build -x -t -n $(RULES_IDENT) -a $(RULES_FOLDER) -b $(VERSION) -target target/validator /src)
else
$(call skip,rules)
endif
Expand Down

0 comments on commit f04c65b

Please sign in to comment.