From daa22def18850a75da43aa6c34294c6fdfbb1935 Mon Sep 17 00:00:00 2001 From: chgl Date: Wed, 9 Oct 2024 21:15:30 +0200 Subject: [PATCH] ci: split build and deploy (#7) * ci: split build and deploy * added release please * ci * dropped lint --- .github/workflows/ci.yaml | 27 +++++++++++++++++---------- .github/workflows/release-please.yaml | 22 ++++++++++++++++++++++ .release-please-manifest.json | 3 +++ renovate.json => .renovaterc.json | 4 +--- PseudonymizationIG/sushi-config.yaml | 2 +- release-please-config.json | 13 +++++++++++++ version.txt | 1 + 7 files changed, 58 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/release-please.yaml create mode 100644 .release-please-manifest.json rename renovate.json => .renovaterc.json (61%) create mode 100644 release-please-config.json create mode 100644 version.txt diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8fdbad0..bd18168 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -17,8 +17,25 @@ concurrency: cancel-in-progress: false jobs: + build: + runs-on: ubuntu-22.04 + container: ghcr.io/miracum/ig-build-tools:v2.1.6@sha256:26bc1eaf0a259e8c16d0eeeb8622c7aecaa45d41e39f158696f9aec90b142596 + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - name: build ig + working-directory: PseudonymizationIG/ + run: | + java -jar /usr/local/bin/publisher.jar -ig ig.ini + - name: Upload artifact + uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1 + with: + path: "PseudonymizationIG/output" + deploy: runs-on: ubuntu-22.04 + if: ${{ github.event_name != 'pull_request' }} + needs: + - build environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} @@ -28,18 +45,8 @@ jobs: id-token: write container: ghcr.io/miracum/ig-build-tools:v2.1.6@sha256:26bc1eaf0a259e8c16d0eeeb8622c7aecaa45d41e39f158696f9aec90b142596 steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: Setup Pages uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0 - - name: build ig - working-directory: PseudonymizationIG/ - run: | - java -jar /usr/local/bin/publisher.jar -ig ig.ini - - name: Upload artifact - uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1 - with: - path: "PseudonymizationIG/output" - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 - if: ${{ github.event_name != 'pull_request' }} diff --git a/.github/workflows/release-please.yaml b/.github/workflows/release-please.yaml new file mode 100644 index 0000000..d1fd5dc --- /dev/null +++ b/.github/workflows/release-please.yaml @@ -0,0 +1,22 @@ +on: + push: + branches: + - master + +name: release-please + +permissions: read-all + +jobs: + release-please: + runs-on: ubuntu-22.04 + permissions: + contents: write + pull-requests: write + steps: + - uses: googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f # v4.1.3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + release-type: simple + config-file: release-please-config.json + manifest-file: .release-please-manifest.json diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..466df71 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "0.1.0" +} diff --git a/renovate.json b/.renovaterc.json similarity index 61% rename from renovate.json rename to .renovaterc.json index 5db72dd..22a9943 100644 --- a/renovate.json +++ b/.renovaterc.json @@ -1,6 +1,4 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": [ - "config:recommended" - ] + "extends": ["config:recommended"] } diff --git a/PseudonymizationIG/sushi-config.yaml b/PseudonymizationIG/sushi-config.yaml index cae3527..833ac2e 100644 --- a/PseudonymizationIG/sushi-config.yaml +++ b/PseudonymizationIG/sushi-config.yaml @@ -9,7 +9,7 @@ name: PseudonymizationIG # title: Example Title # description: Example Implementation Guide for getting started with SUSHI status: draft # draft | active | retired | unknown -version: 0.1.0 +version: 0.1.0 # x-release-please-version fhirVersion: 4.0.1 # https://www.hl7.org/fhir/valueset-FHIR-version.html copyrightYear: 2024+ releaseLabel: ci-build diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..0ecca9d --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": true, + "include-v-in-tag": true, + "separate-pull-requests": true, + "extra-label": "release-please", + "packages": { + ".": { + "release-type": "simple" + } + } +} diff --git a/version.txt b/version.txt new file mode 100644 index 0000000..6e8bf73 --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +0.1.0