forked from hiredman/clj-http-lite
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automate publishing of release (#69)
Invoked via `bb publish` Read doc/03-maintainer-guide.adoc for details Details of interest: - using neil convention of storing version in deps.edn - tagging with v1.2.3 instead of Release-1.2.3 - now at version 1.x (was 0.x) - version patch is now release count, was commit count, next version should be 1.0.13 - hiredman - 4 releases - martinklepsch - 4 releases - clj-commons - 4 releases - addition of anemic pom includes artifact description which gets displayed by services like clojars and cljdoc Closes #65
- Loading branch information
Showing
21 changed files
with
681 additions
and
337 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: publish | ||
on: | ||
push: | ||
tags: | ||
- 'v\d+.*' | ||
|
||
jobs: | ||
test: | ||
uses: ./.github/workflows/tests.yml | ||
|
||
publish: | ||
environment: publish | ||
runs-on: ubuntu-latest | ||
needs: [test] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup | ||
uses: ./.github/workflows/shared-setup | ||
with: | ||
jdk: '8' | ||
|
||
- name: Deploy to clojars | ||
env: | ||
CLOJARS_USERNAME: ${{ secrets.CLOJARS_USERNAME }} | ||
CLOJARS_PASSWORD: ${{ secrets.CLOJARS_PASSWORD }} | ||
run: bb -ci-clojars-deploy | ||
|
||
- name: Create GitHub Release | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: bb -ci-github-create-release | ||
|
||
- name: Inform Cljdoc | ||
run: bb -ci-cljdoc-request-build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: 'shared setup' | ||
inputs: | ||
jdk: | ||
description: 'jdk version' | ||
required: true | ||
shell: | ||
# shell must be specified for run:s for composite actions | ||
description: 'which shell to use' | ||
required: false | ||
default: bash | ||
|
||
runs: | ||
using: 'composite' | ||
|
||
steps: | ||
- name: Clojure deps cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.m2/repository | ||
~/.deps.clj | ||
~/.gitlibs | ||
key: cljdeps-${{ hashFiles('deps.edn', 'bb.edn') }} | ||
restore-keys: cljdeps- | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: ${{ inputs.jdk }} | ||
|
||
- name: Install Clojure Tools | ||
uses: DeLaGuardo/[email protected] | ||
with: | ||
cli: 'latest' | ||
bb: 'latest' | ||
|
||
- name: Tools Versions | ||
shell: ${{ inputs.shell }} | ||
run: | | ||
echo "java -version" | ||
java -version | ||
echo "bb --version" | ||
bb --version | ||
echo "clojure --version" | ||
clojure --version | ||
- name: Download Clojure Dependencies | ||
shell: ${{ inputs.shell }} | ||
run: bb download-deps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: tests | ||
on: | ||
# allow this workflow to be called from other workflows, namely: publish | ||
workflow_call: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Setup | ||
uses: ./.github/workflows/shared-setup | ||
with: | ||
jdk: '11' | ||
|
||
- name: Lint | ||
run: bb lint | ||
|
||
test-jvm: | ||
runs-on: ${{ matrix.os.name }}-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [{name: 'windows', shell: 'pwsh'}, {name: 'ubuntu', shell: 'bash'}] | ||
clojure-version: ["1.8", "1.9", "1.10", "1.11"] | ||
jdk: ['8', '11', '17'] | ||
|
||
name: ${{ matrix.os.name }} clj-${{ matrix.clojure-version }} jdk${{ matrix.java-version }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup | ||
uses: ./.github/workflows/shared-setup | ||
with: | ||
jdk: ${{ matrix.jdk }} | ||
shell: ${{ matrix.os.shell }} | ||
|
||
- name: Run tests | ||
run: bb test:jvm --clj-version ${{ matrix.clojure-version }} | ||
|
||
test-bb: | ||
runs-on: ${{ matrix.os.name }}-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [{name: 'windows', shell: 'pwsh'}, {name: 'ubuntu', shell: 'bash'}] | ||
|
||
name: ${{ matrix.os.name }} bb | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Setup | ||
uses: ./.github/workflows/shared-setup | ||
with: | ||
jdk: '11' | ||
shell: ${{ matrix.os.shell }} | ||
|
||
- name: Run tests | ||
run: bb test:bb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.