From 9841fb3a5948ef8b02d00455602fc0273b0e5ae0 Mon Sep 17 00:00:00 2001 From: BaekGeunYoung Date: Wed, 13 Mar 2024 16:09:51 +0900 Subject: [PATCH] config credential --- .github/workflows/publish.yml | 3 +++ build.sbt | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6e32d2d05..afba125eb 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 ac17f9e08..2a325e3ce 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(