Compare commits

...

2 commits

Author SHA1 Message Date
Eddú Meléndez
a7c6c306e7
Remove clojars 2023-08-24 12:01:01 -06:00
Eddú Meléndez
224aeeebbe
Add release workflow
Release workflow will deploy artifacts to `clojars` and `maven`.
2023-08-23 21:57:59 -06:00
4 changed files with 64 additions and 11 deletions

18
.github/actions/setup-build/action.yml vendored Normal file
View file

@ -0,0 +1,18 @@
name: Set up Build
description: Sets up Build
runs:
using: "composite"
steps:
- uses: actions/setup-java@v3
with:
java-version: '8'
distribution: temurin
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-lein-${{ hashFiles('**/project.clj') }}
restore-keys: ${{ runner.os }}-lein-
- name: Clear existing docker image cache
shell: bash
run: docker image prune -af

View file

@ -6,13 +6,16 @@ on:
pull_request:
branches: [ master ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup Build
uses: ./.github/actions/setup-build
- name: Install dependencies
run: lein deps
- name: Run tests

28
.github/workflows/release.yml vendored Normal file
View file

@ -0,0 +1,28 @@
name: Release
on:
release:
types: [published]
permissions:
contents: read
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Build
uses: ./.github/actions/setup-build
- name: Set version
run: |
lein change version set '"${{github.event.release.tag_name}}"'
- name: Release ${{github.event.release.tag_name}}
run: lein with-profile release deploy maven
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}

View file

@ -1,7 +1,7 @@
(defproject clj-test-containers "0.7.4"
:description "A lightweight, unofficial wrapper around the Testcontainers Java library"
(defproject clj-test-containers "unspecified"
:description "A lightweight, official wrapper around the Testcontainers Java library"
:url "https://github.com/javahippie/clj-test-containers"
:url "https://github.com/testcontainers/testcontainers-clj"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
@ -25,6 +25,10 @@
[org.testcontainers/postgresql "1.19.0"]
[com.fzakaria/slf4j-timbre "0.3.21"]
[nrepl "1.0.0"]]
:source-paths ["dev-src"]}}
:source-paths ["dev-src"]}
:release {:deploy-repositories [["maven" {:url "https://oss.sonatype.org/service/local/staging/deploy/maven2"
:username :env/ossrh_username
:password :env/ossrh_password
:sign-releases false}]]}}
:target-path "target/%s")