Skip to content

Commit

Permalink
Updated: GitHub Actions config - also removed maven sync script
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-lee committed Apr 23, 2021
1 parent c1b6c4a commit 65b43b5
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 37 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@ name: Build-All

on:
push:
branches-ignore:
- main

pull_request:
branches:
- "**"
- main


jobs:
Expand All @@ -21,7 +25,7 @@ jobs:
- { name: 'Scala 3', version: "3.0.0-RC2", binary-version: "3.0.0-RC2", java-version: "adopt@1.11", report: "" }

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2.3.4
- uses: olafurpg/setup-scala@v10
with:
java-version: ${{ matrix.scala.java-version }}
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/maven_central_sync.sh

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/publish-github-pages.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish GitHub Pages
name: [M] Doc site - Publish

on:
workflow_dispatch:
Expand Down
55 changes: 54 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Release

on:
push:
branches:
- main
tags:
- '*'

Expand All @@ -12,6 +14,7 @@ env:

jobs:
gh-release:
if: startsWith(github.ref, 'refs/tags/v')

runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -40,7 +43,7 @@ jobs:
mkdir -p dotty-docs
export SOURCE_DATE_EPOCH=$(date +%s)
echo "SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH"
echo 'sbt -J-Xmx2048m clean +test +packagedArtifacts gitHubRelease'
echo 'sbt -J-Xmx2048m devOopsGitHubRelease'
sbt \
-J-Xmx2048m \
devOopsGitHubRelease
Expand Down Expand Up @@ -71,6 +74,7 @@ jobs:
${{ runner.os }}-sbt
- name: "sbt ci-release - ${{ github.run_number }}"
if: startsWith(github.ref, 'refs/tags/v')
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
Expand All @@ -91,3 +95,52 @@ jobs:
+packagedArtifacts \
ci-release \
devOopsGitHubReleaseUploadArtifacts
publish-snapshot:
if: startsWith(github.ref, 'refs/heads/')

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
- uses: olafurpg/setup-scala@v10
with:
java-version: ${{ env.GH_JAVA_VERSION }}
- uses: olafurpg/setup-gpg@v3

- name: Cache SBT
uses: actions/cache@v2
with:
path: |
~/.ivy2/cache
~/.cache/coursier
~/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('**/build.properties') }}
restore-keys: |
${{ runner.os }}-sbt
- name: "sbt ci-release (no tag) - ${{ github.run_number }}"
if: startsWith(github.ref, 'refs/heads/')
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
GITHUB_TOKEN: ${{ secrets.GITHUB_AUTH_TOKEN }}
run: |
echo "Run] sbt ci-release"
export SOURCE_DATE_EPOCH=$(date +%s)
echo "SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH"
echo 'sbt -J-Xmx2048m -v clean +test +packagedArtifacts ci-release devOopsGitHubReleaseUploadArtifacts'
sbt \
-J-XX:MaxMetaspaceSize=1024m \
-J-Xmx2048m \
-v \
clean \
+test \
+packagedArtifacts \
ci-release
9 changes: 7 additions & 2 deletions .github/workflows/sbt-build-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,15 @@ else
echo "--------------------------------------------"
echo ""

test_task="test scalafix"
test_task="test"
if [ "$scala_version" == 2\.* ]
then
test_task="${test_task} scalafix"
fi

if [ "$2" == "report" ]
then
test_task="coverage test scalafix coverageReport coverageAggregate coveralls"
test_task="coverage ${test_task} coverageReport coverageAggregate coveralls"
fi

echo "sbt -J-Xmx2048m ++${scala_version}! -v clean ${test_task}"
Expand Down
1 change: 0 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import SemVer.{Major, Minor}
ThisBuild / semanticdbEnabled := false

ThisBuild / scalaVersion := props.ProjectScalaVersion
ThisBuild / version := ProjectVersion
ThisBuild / organization := "io.kevinlee"
ThisBuild / developers := List(
Developer(
Expand Down

0 comments on commit 65b43b5

Please sign in to comment.