From 3e3482c2b6d2ac227bf7a3fa3beaa2b202e39d87 Mon Sep 17 00:00:00 2001 From: Mark Mestern Date: Fri, 11 Sep 2026 15:54:14 +0100 Subject: [PATCH 1/4] Migrate to GitHub Packages Re-add the GHA push workflow (reverted in 04d02a1) and replace the s3-release job with github-release, publishing to GitHub Packages via the reusable-clojure-publish workflow. Update project.clj to point at the github repo instead of the S3 internal-jars releases/snapshots repos. --- .github/workflows/push.yaml | 65 +++++++++++++++++++++++++++++++++++++ .gitignore | 1 - project.clj | 18 ++++------ 3 files changed, 72 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/push.yaml diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml new file mode 100644 index 0000000..b83de65 --- /dev/null +++ b/.github/workflows/push.yaml @@ -0,0 +1,65 @@ +name: push +on: [push, deployment] +permissions: + contents: read + id-token: write + + +env: + BUILD_NUMBER: ${{ github.run_number }} # used in project file. Version number is 1.0.BUILD_NUMBER + +jobs: + deps: + uses: uswitch/reusable-actions/.github/workflows/reusable-clojure-deps.yaml@v2 + lint: + needs: deps + uses: uswitch/reusable-actions/.github/workflows/reusable-clojure-lint.yaml@v2 + test: + needs: deps + runs-on: ubuntu-latest + env: + APP_ENV: test + IS_IN_CI: "true" + steps: + - run: echo event name ${{ github.event_name }} branch ${{ github.ref_name }} + - uses: actions/checkout@v4 + - uses: actions/cache/restore@v4 + with: + path: ${{ needs.deps.outputs.deps_path }} + key: ${{ needs.deps.outputs.hash_key }} + - uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 20 + - uses: DeLaGuardo/setup-clojure@11.0 + with: + lein: 2.9.1 + - uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: arn:aws:iam::136393635417:role/all-internal-jars-readonly + aws-region: eu-west-1 + # Exit status 143 here would indicate timeout + - run: timeout --preserve-status 5m lein test + uberjar: + needs: deps + uses: uswitch/reusable-actions/.github/workflows/reusable-clojure-uberjar.yaml@v2 + with: + jar_file: ./target/ + lein_version: 2.9.1 + distribution: temurin + java_version: 20 + deps_key: ${{ needs.deps.outputs.hash_key }} + github-release: + name: Push jar to GitHub Packages (only on push to master) + if: ${{ github.ref_name == 'master' }} + needs: + - uberjar + - deps + - test + permissions: + contents: read + packages: write + uses: uswitch/reusable-actions/.github/workflows/reusable-clojure-publish.yaml@v2 + with: + java_version: 20 + lein_version: 2.9.1 diff --git a/.gitignore b/.gitignore index aed2124..5f08043 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -.github .lsp .clj-kondo pom.xml diff --git a/project.clj b/project.clj index 15be321..642ccd9 100644 --- a/project.clj +++ b/project.clj @@ -8,15 +8,11 @@ :license {:name "Eclipse"} :dependencies [[org.clojure/clojure "1.10.0"]] :plugins [[s3-wagon-private "1.3.4"]] - :repositories {"s3-releases" - {:url "s3p://uswitch-internal-jars/releases" - :sign-releases false - :no-auth true} - "s3-snapshots" - {:url "s3p://uswitch-internal-jars/snapshots" - :sign-releases false - :no-auth true} - "clojars" + :repositories {"clojars" {:sign-releases false - :no-auth false}} - :lein-release {:deploy-via "s3-releases"}) + :no-auth false} + "github" {:url "https://maven.pkg.github.com/uswitch/mississippi" + :username :env/GITHUB_ACTOR + :password :env/GITHUB_TOKEN + :sign-releases false}} + :lein-release {:deploy-via "github"}) From a0b5719a8ed9f738013e50e698895c293c642b5e Mon Sep 17 00:00:00 2001 From: Mark Mestern Date: Fri, 11 Sep 2026 15:58:13 +0100 Subject: [PATCH 2/4] Remove Drone release job Release now happens via the GHA github-release job, and this job's lein deploy s3-releases target no longer exists in project.clj. --- .drone.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.drone.yml b/.drone.yml index dd01400..12227f4 100644 --- a/.drone.yml +++ b/.drone.yml @@ -9,17 +9,6 @@ pipeline: - lein test - lein jar - release: - image: clojure:openjdk-15-lein-2.9.5 - when: - branch: master - event: push - secrets: [ "aws_access_key_id", "aws_secret_access_key"] - commands: - - lein deps - - lein jar - - lein deploy s3-releases - # notify-slack: # when: # branch: master From f846e1533c4228be7da37c31a0484a9681bbe076 Mon Sep 17 00:00:00 2001 From: Mark Mestern Date: Fri, 11 Sep 2026 15:58:29 +0100 Subject: [PATCH 3/4] Remove Drone CI config CI and release are now fully handled by the GHA push workflow. --- .drone.yml | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index 12227f4..0000000 --- a/.drone.yml +++ /dev/null @@ -1,22 +0,0 @@ -pipeline: - build-uberjar: - when: - event: push - image: clojure:openjdk-15-lein-2.9.5 - secrets: [ "aws_access_key_id", "aws_secret_access_key"] - commands: - - lein deps - - lein test - - lein jar - - # notify-slack: - # when: - # branch: master - # event: push - # image: plugins/slack - # webhook: https://hooks.slack.com/services/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 - # channel: clojure - # username: drone - # template: > - # {{ repo.name }}:{{ build.branch }} finished build {{ build.number }} - # with a status of {{ build.status }}. See it at https://ci.usw.co/{{ repo.name }}/{{ build.number }} From 9545122320e99099221caabb1e2abdc282462552 Mon Sep 17 00:00:00 2001 From: Mark Mestern Date: Fri, 11 Sep 2026 16:02:52 +0100 Subject: [PATCH 4/4] updated readme --- README.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/README.md b/README.md index 5ae0b08..1208191 100644 --- a/README.md +++ b/README.md @@ -135,10 +135,7 @@ Distributed under the Eclipse Public License, the same as Clojure. ## Deployment -`lein deploy clojars` uses the uswitch-service account, the credentials are stored in keeper. - -You'll have to log in to clojars as `uswitch-service` and generate a deployment token. - +We deploy via github packages only. ## Produce snaphot releases for testing: