-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
112 additions
and
71 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,42 +1,68 @@ | ||
name: CI | ||
name: Continuous Integration | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- "v*" | ||
pull_request: | ||
branches: ['**', '!update/**', '!pr/**'] | ||
push: | ||
branches: ['**', '!update/**', '!pr/**'] | ||
tags: [v*] | ||
|
||
jobs: | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
test: | ||
if: github.event_name == 'push' || github.event_name == 'pull_request' | ||
runs-on: ubuntu-latest | ||
|
||
concurrency: | ||
group: ${{ github.workflow }} @ ${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
name: Build and Test | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
scala: [3] | ||
java: [temurin@17] | ||
project: [jvm] | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 60 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: coursier/[email protected] | ||
- uses: VirtusLab/scala-cli-setup@main | ||
- uses: taiki-e/install-action@just | ||
- name: Install Playwright | ||
run: just setupPlaywright | ||
- name: compile | ||
run: just compile | ||
- name: test | ||
run: just test | ||
- name: Checkout current branch (full) | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Java (temurin@17) | ||
id: setup-java-temurin-17 | ||
if: matrix.java == 'temurin@17' | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: temurin | ||
java-version: 17 | ||
|
||
- name: Test | ||
run: ./mill project.test | ||
|
||
publish: | ||
needs: test | ||
if: github.event_name == 'push' | ||
if: github.repository == 'Quafadas/live-server-scala-cli-js' && contains(github.ref, 'refs/tags/') | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: coursier/[email protected] | ||
- uses: VirtusLab/scala-cli-setup@main | ||
|
||
- name: Publish | ||
run: scala-cli publish . --power --secret-key value:${{secrets.PUBLISH_SECRET_KEY}} --secret-key-password value:${{secrets.PUBLISH_SECRET_KEY_PASSWORD}} --user value:${{ secrets.PUBLISH_USER }} --password value:${{secrets.PUBLISH_PASSWORD}} | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
fetch-tags: true | ||
|
||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 17 | ||
|
||
- name: Setup GPG secrets | ||
run: | | ||
gpg --version | ||
cat <(echo "${{ secrets.PUBLISH_SECRET_KEY }}") | base64 --decode | gpg --batch --import | ||
gpg --list-secret-keys --keyid-format LONG | ||
- name: Publish to Maven Central | ||
run: ./mill -i mill.scalalib.PublishModule/publishAll __.publishArtifacts --sonatypeUri https://s01.oss.sonatype.org/service/local --sonatypeCreds "${{ secrets.PUBLISH_USER }}:${{ secrets.PUBLISH_PASSWORD }}" --gpgArgs "--passphrase=${{ secrets.PUBLISH_SECRET_KEY_PASSWORD}},--batch,--yes,-a,-b,--pinentry-mode,loopback" --readTimeout 600000 --awaitTimeout 600000 --release true --signed true |
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 |
---|---|---|
|
@@ -3,4 +3,6 @@ | |
.bsp | ||
.vscode | ||
native | ||
testDir | ||
testDir | ||
.bsp | ||
out |
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 @@ | ||
0.11.7 |
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
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,41 @@ | ||
import mill._ | ||
import mill.scalalib._ | ||
|
||
object project extends ScalaModule with PublishModule { | ||
def scalaVersion = "3.4.1" | ||
def ivyDeps = super.ivyDeps() ++ Seq( | ||
ivy"org.http4s::http4s-ember-server::0.23.26", | ||
ivy"org.http4s::http4s-dsl::0.23.26", | ||
ivy"org.http4s::http4s-scalatags::0.25.2", | ||
ivy"io.circe::circe-core::0.14.6", | ||
ivy"io.circe::circe-generic::0.14.6", | ||
ivy"co.fs2::fs2-io::3.10.2", | ||
ivy"com.lihaoyi::scalatags::0.12.0" | ||
) | ||
|
||
def publishVersion = VcsVersion.vcsState().format() | ||
|
||
object test extends ScalaTests with TestModule.Munit { | ||
def ivyDeps = super.ivyDeps() ++ Seq( | ||
ivy"org.scalameta::munit::1.0.0-M11", | ||
ivy"com.microsoft.playwright:playwright:1.41.1", | ||
ivy"com.microsoft.playwright:driver-bundle:1.41.1", | ||
) | ||
} | ||
|
||
override def pomSettings = T { | ||
PomSettings( | ||
description = "An experimental live server for scala JS projects", | ||
organization = "io.github.quafadas", | ||
url = "https://github.com/Quafadas/live-server-scala-cli-js", | ||
licenses = Seq(License.`Apache-2.0`), | ||
versionControl = | ||
VersionControl.github("quafadas", "live-server-scala-cli-js"), | ||
developers = Seq( | ||
Developer("quafadas", "Simon Parten", "https://github.com/quafadas") | ||
) | ||
) | ||
} | ||
|
||
|
||
} |
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
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.