Skip to content

Commit

Permalink
Merge pull request #148 from Atry/template
Browse files Browse the repository at this point in the history
Update template
  • Loading branch information
Atry committed Jan 27, 2023
2 parents 69a6a07 + e0979e0 commit 6ba9663
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 32 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/scala-steward.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
on:
push:
branches-ignore:
- 'update/**'
- "update/**"
schedule:
- cron: '0 0 * * 0'
- cron: "0 0 * * 0"
workflow_dispatch:

name: Launch Scala Steward

Expand Down
61 changes: 31 additions & 30 deletions .github/workflows/scala.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,46 @@ name: Scala CI
on:
push:
branches-ignore:
- 'update/**'
- "update/**"
tags:
- "v*"
pull_request:

jobs:
build:

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
scala:
- 3.2.2
- 3.2.2

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Need the git history for sbt-dynver to determine the version
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: temurin
- name: Cache SBT
uses: actions/cache@v3
with:
path: |
~/.ivy2/local/
~/.ivy2/cache/
~/.sbt/
~/.coursier/
key: |
${{runner.os}}-${{matrix.scala}}-${{hashFiles('**/*.sbt')}}-${{matrix.sbt-args}}
${{runner.os}}-${{matrix.scala}}-${{hashFiles('**/*.sbt')}}
${{runner.os}}-${{matrix.scala}}-
- name: Run tests
run: sbt ${{matrix.sbt-args}} ++${{ matrix.scala }} test
- name: Publish to Maven Central Repository
env:
GITHUB_PERSONAL_ACCESS_TOKEN: ${{secrets.PERSONAL_ACCESS_TOKEN}}
if: ${{ env.GITHUB_PERSONAL_ACCESS_TOKEN != '' && github.event_name != 'pull_request' }}
run: sbt ${{matrix.sbt-args}} ++${{ matrix.scala }} "set every Seq(sonatypeSessionName := \"${{github.workflow}} ${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}-$$ ${{ matrix.scala }}\", publishTo := sonatypePublishToBundle.value)" publishSigned sonatypeBundleRelease
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Need the git history for sbt-dynver to determine the version
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: "11"
distribution: temurin
- name: Cache SBT
uses: actions/cache@v3
with:
path: |
~/.ivy2/local/
~/.ivy2/cache/
~/.sbt/
~/.coursier/
key: |
${{runner.os}}-${{matrix.scala}}-${{hashFiles('**/*.sbt')}}-${{matrix.sbt-args}}
${{runner.os}}-${{matrix.scala}}-${{hashFiles('**/*.sbt')}}-
${{runner.os}}-${{matrix.scala}}-
- name: Run tests
run: sbt ${{matrix.sbt-args}} ++${{ matrix.scala }} test
- name: Publish to Maven Central Repository
env:
GITHUB_PERSONAL_ACCESS_TOKEN: ${{secrets.PERSONAL_ACCESS_TOKEN}}
if: ${{ env.GITHUB_PERSONAL_ACCESS_TOKEN != '' && github.event_name != 'pull_request' }}
run: sbt ${{matrix.sbt-args}} ++${{ matrix.scala }} "set every Seq(sonatypeSessionName := \"${{github.workflow}} ${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}-$$ ${{ matrix.scala }}\", publishTo := sonatypePublishToBundle.value)" publishSigned sonatypeBundleRelease

0 comments on commit 6ba9663

Please sign in to comment.