diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6e32d2d0..afba125e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,6 +6,9 @@ on: - 'v*' workflow_dispatch: +env: + PACKAGE_GITHUB_TOKEN: ${{ secrets.IAMPORT_COMMON }} + jobs: publish: name: Build and Publish diff --git a/build.sbt b/build.sbt index ac17f9e0..2a325e3c 100644 --- a/build.sbt +++ b/build.sbt @@ -18,8 +18,8 @@ val commonPublishSettings = Seq( Credentials( "GitHub Package Registry", "maven.pkg.github.com", - scala.sys.env("GITHUB_ACTOR"), - scala.sys.env("GITHUB_TOKEN") + scala.sys.env.get("PACKAGE_GITHUB_TOKEN").fold(scala.sys.env("CHAI_GPR_USERNAME"))(_ => "iamport-github"), + scala.sys.env.getOrElse("PACKAGE_GITHUB_TOKEN", scala.sys.env("CHAI_GPR_TOKEN")) ) ), publishTo := Some(