Skip to content

Commit

Permalink
Prepare release
Browse files Browse the repository at this point in the history
  • Loading branch information
ennru committed Jan 30, 2024
1 parent 36d6be6 commit da8adfb
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 69 deletions.
73 changes: 19 additions & 54 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ name: Continuous Integration

on:
pull_request:
branches: [master, main]
branches: [main]
push:
branches: [master, main]
branches: [main]
tags: [v*]

env:
Expand All @@ -24,58 +24,40 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.12.18]
java: [temurin@8, temurin@11, temurin@17]
java: [temurin@11, temurin@17]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Java (temurin@8)
if: matrix.java == 'temurin@8'
uses: actions/setup-java@v2
with:
distribution: temurin
java-version: 8

- name: Setup Java (temurin@11)
if: matrix.java == 'temurin@11'
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
cache: sbt

- name: Setup Java (temurin@17)
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17

- name: Cache sbt
uses: actions/cache@v2
with:
path: |
~/.sbt
~/.ivy2/cache
~/.coursier/cache/v1
~/.cache/coursier/v1
~/AppData/Local/Coursier/Cache/v1
~/Library/Caches/Coursier/v1
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
cache: sbt

- name: Check that workflows are up to date
run: sbt ++${{ matrix.scala }} githubWorkflowCheck
run: sbt '++ ${{ matrix.scala }}' githubWorkflowCheck

- name: Build project
run: sbt ++${{ matrix.scala }} test
- run: sbt '++ ${{ matrix.scala }}' test scripted

- name: Compress target directories
run: tar cf targets.tar target project/target

- name: Upload target directories
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }}
path: targets.tar
Expand All @@ -88,49 +70,32 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.12.18]
java: [temurin@8]
java: [temurin@11]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Java (temurin@8)
if: matrix.java == 'temurin@8'
uses: actions/setup-java@v2
with:
distribution: temurin
java-version: 8

- name: Setup Java (temurin@11)
if: matrix.java == 'temurin@11'
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
cache: sbt

- name: Setup Java (temurin@17)
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17

- name: Cache sbt
uses: actions/cache@v2
with:
path: |
~/.sbt
~/.ivy2/cache
~/.coursier/cache/v1
~/.cache/coursier/v1
~/AppData/Local/Coursier/Cache/v1
~/Library/Caches/Coursier/v1
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
cache: sbt

- name: Download target directories (2.12.18)
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-2.12.18-${{ matrix.java }}

Expand All @@ -144,4 +109,4 @@ jobs:
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
run: sbt ++${{ matrix.scala }} ci-release
run: sbt ci-release
3 changes: 2 additions & 1 deletion .github/workflows/clean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Delete artifacts
shell: bash {0}
run: |
# Customize those three lines with your repository and credentials:
REPO=${GITHUB_API_URL}/repos/${{ github.repository }}
Expand All @@ -25,7 +26,7 @@ jobs:
ghapi() { curl --silent --location --user _:$GITHUB_TOKEN "$@"; }
# A temporary file which receives HTTP response headers.
TMPFILE=/tmp/tmp.$$
TMPFILE=$(mktemp)
# An associative array, key: artifact name, value: number of artifacts of that name.
declare -A ARTCOUNT
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,5 @@ Feel free to ping contributors for code review or discussions. Pull requests are

[maven-central]: https://maven-badges.herokuapp.com/maven-central/com.lightbend.paradox/sbt-paradox-dependencies
[maven-central-badge]: https://maven-badges.herokuapp.com/maven-central/com.lightbend.paradox/sbt-paradox-dependencies/badge.svg
[github-actions]: https://github.com/lightbend/sbt-paradox-dependencies/actions/workflows/ci.yml?query=branch%3Amaster
[github-actions-badge]: https://github.com/lightbend/sbt-paradox-dependencies/actions/workflows/ci.yml/badge.svg?branch=master

[github-actions]: https://github.com/lightbend/sbt-paradox-dependencies/actions/workflows/ci.yml?query=branch%3Amain
[github-actions-badge]: https://github.com/lightbend/sbt-paradox-dependencies/actions/workflows/ci.yml/badge.svg?branch=main
6 changes: 3 additions & 3 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Releasing

1. Check [the travis build](https://travis-ci.com/lightbend/sbt-paradox-dependencies) has completed
1. Edit the [draft release](https://github.com/lightbend/sbt-paradox-dependencies/releases) and relase it with a tag like `v0.2`
1. Travis CI will start a [CI build](https://travis-ci.org/lightbend/sbt-paradox-dependencies/builds) for the new tag and publish artifacts to Bintray.
* Draft a [new release on GitHub](https://github.com/lightbend/sbt-paradox-dependencies/releases)
* Tag it (with a `v` prefix)
* Github actions should automatically release to maven-central
8 changes: 3 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,12 @@ ThisBuild / githubWorkflowPublish := Seq(
)
)

ThisBuild / test / publishArtifact := false
ThisBuild / pomIncludeRepository := (_ => false)
sonatypeProfileName := "com.lightbend"
sonatypeProfileName := "com.lightbend"

ThisBuild / githubWorkflowJavaVersions := List(
JavaSpec.temurin("8"),
JavaSpec.temurin("11"),
JavaSpec.temurin("17")
)

ThisBuild / githubWorkflowTargetBranches := Seq("master", "main")
ThisBuild / githubWorkflowTargetBranches := Seq("main")
ThisBuild / githubWorkflowBuild := Seq(WorkflowStep.Sbt(List("test", "scripted")))
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.9.7
sbt.version=1.9.8
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")
addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.14.2")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.22.0")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")

0 comments on commit da8adfb

Please sign in to comment.