From d5f1535505a50c9c2af3f0a121794b1420348c59 Mon Sep 17 00:00:00 2001 From: chgl Date: Wed, 9 Oct 2024 20:50:38 +0200 Subject: [PATCH 1/4] ci: split build and deploy --- .github/workflows/ci.yaml | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) 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' }} From daedd6e6bb5eb34c7ac97524fdc435d87998b37b Mon Sep 17 00:00:00 2001 From: chgl Date: Wed, 9 Oct 2024 21:06:53 +0200 Subject: [PATCH 2/4] added release please --- .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 | 12 ++++++++++++ version.txt | 1 + 6 files changed, 40 insertions(+), 4 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/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..cfbae43 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,12 @@ +{ + "$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, + "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 From beaa5dc9777c459e478b44a578e7a84019f922b4 Mon Sep 17 00:00:00 2001 From: chgl Date: Wed, 9 Oct 2024 21:08:32 +0200 Subject: [PATCH 3/4] ci --- .github/workflows/ci.yaml | 16 ++++++++++++++++ release-please-config.json | 1 + 2 files changed, 17 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index bd18168..129d516 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -50,3 +50,19 @@ jobs: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 + + lint: + uses: miracum/.github/.github/workflows/standard-lint.yaml@b2389048770aa5b9ed439810bf84911fbb07f645 # v1.12.3 + if: ${{ !contains(github.event.pull_request.labels.*.name, 'release-please') }} + permissions: + contents: read + pull-requests: write + issues: write + security-events: write + actions: read + with: + enable-validate-gradle-wrapper: false + enable-codeql: false + enable-verify-base-image-signature: false + secrets: + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/release-please-config.json b/release-please-config.json index cfbae43..0ecca9d 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -4,6 +4,7 @@ "bump-patch-for-minor-pre-major": true, "include-v-in-tag": true, "separate-pull-requests": true, + "extra-label": "release-please", "packages": { ".": { "release-type": "simple" From 24354d547ec9c04f01d2655f8b3f6a92bc98ed0f Mon Sep 17 00:00:00 2001 From: chgl Date: Wed, 9 Oct 2024 21:13:38 +0200 Subject: [PATCH 4/4] dropped lint --- .github/workflows/ci.yaml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 129d516..bd18168 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -50,19 +50,3 @@ jobs: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 - - lint: - uses: miracum/.github/.github/workflows/standard-lint.yaml@b2389048770aa5b9ed439810bf84911fbb07f645 # v1.12.3 - if: ${{ !contains(github.event.pull_request.labels.*.name, 'release-please') }} - permissions: - contents: read - pull-requests: write - issues: write - security-events: write - actions: read - with: - enable-validate-gradle-wrapper: false - enable-codeql: false - enable-verify-base-image-signature: false - secrets: - github-token: ${{ secrets.GITHUB_TOKEN }}