Skip to content

Setup CI release #475

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 12, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release
on:
push:
tags: ["v*"]
jobs:
publish:
runs-on: ubuntu-20.04
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ubuntu-latest probably better

strategy:
matrix:
scalajsversion: ["1.x", "0.6.x"]
env:
SCALAJS_VERSION: "${{ matrix.scalajsversion == '0.6.x' && '0.6.28' || '' }}"
steps:
- uses: actions/[email protected]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just @v2, that way it will pick up compatible 2.x.x actions automatically.

with:
fetch-depth: 0
- uses: olafurpg/setup-scala@v10
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

13 is latest. I'll add dependabot for these later (or feel free to yourself if you want)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never used dependabot. My chance to learn! This is what you install? https://github.com/apps/dependabot-preview

- run: sbt ci-release
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
11 changes: 10 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ val commonSettings = Seq(
scalacOptions ++= Seq("-deprecation", "-feature", "-Xfatal-warnings")
)

val noPublishSettings = Seq(
skip in publish := true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe in 1.5.5 this is all we need, all the rest is redundant stuff that I created years ago in the 0.13.x days, and now it seems to have spread around verbatim haha. Plus change to publish / skip

publish := (()),
publishLocal := (()),
publishArtifact := false,
publishTo := None
)

normalizedName := "scalajs-dom"

commonSettings
Expand Down Expand Up @@ -115,9 +123,10 @@ lazy val readme = ScalatexReadme(
scalaVersion := "2.12.10",
scalacOptions ++= Seq("-deprecation", "-feature", "-Xfatal-warnings"),
(Compile / resources) += (example / Compile / fullOptJS).value.data
)
).settings(noPublishSettings: _*)

lazy val example = project.
enablePlugins(ScalaJSPlugin).
settings(commonSettings: _*).
settings(noPublishSettings: _*).
dependsOn(root)