diff --git a/.github/workflows/publish-artifacts.yml b/.github/workflows/publish-artifacts.yml index 9f5fd986380..d82663cf136 100644 --- a/.github/workflows/publish-artifacts.yml +++ b/.github/workflows/publish-artifacts.yml @@ -25,7 +25,8 @@ jobs: # when in master repo, publish all tags and manual runs on main if: github.repository == 'com-lihaoyi/mill' runs-on: ubuntu-latest - + env: + MILL_STABLE_VERSION: 1 steps: - uses: actions/checkout@v4 with: {fetch-depth: 0} @@ -56,6 +57,7 @@ jobs: concurrency: publish-sonatype-${{ github.sha }} env: + MILL_STABLE_VERSION: 1 MILL_SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} MILL_SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} MILL_PGP_SECRET_BASE64: ${{ secrets.SONATYPE_PGP_SECRET }} @@ -93,6 +95,7 @@ jobs: runs-on: ubuntu-latest env: + MILL_STABLE_VERSION: 1 REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }} steps: diff --git a/build.mill b/build.mill index 7a1d32289b3..f114a1fe068 100644 --- a/build.mill +++ b/build.mill @@ -258,7 +258,7 @@ object Deps { def millVersion: T[String] = Task { if (Task.env.contains("MILL_STABLE_VERSION")) VcsVersion.calcVcsState(Task.log).format() - else "DEV" + else "SNAPSHOT" } def millLastTag: T[String] = Task { @@ -405,11 +405,7 @@ trait MillPublishJavaModule extends MillJavaModule with PublishModule { } def artifactName = "mill-" + super.artifactName() - def publishVersion = Task { - val version = millVersion() - assert(version != "DEV") - version - } + def publishVersion = millVersion() def publishProperties = super.publishProperties() ++ Map( "info.releaseNotesURL" -> Settings.changelogUrl )