Merge pull request #21 from BGMSound/develop #14
This file contains hidden or 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
| name: 퍼블리시 | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - README.md | |
| concurrency: | |
| group: publish | |
| jobs: | |
| recognize-version: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| project-version: ${{ steps.recognize-project-version.outputs.project-version }} | |
| steps: | |
| - name: GitHub 리포지토리 체크아웃 | |
| uses: actions/checkout@v4 | |
| - name: 프로젝트 버전 인식 | |
| id: recognize-project-version | |
| run: | | |
| PROJECT_VERSION=$(cat gradle.properties | grep -i project.version | cut -d'=' -f2) | |
| echo "project-version=$PROJECT_VERSION" >> $GITHUB_OUTPUT | |
| echo "project version is $PROJECT_VERSION" | |
| publish-to-mavencentral: | |
| needs: [ recognize-version ] | |
| uses: ./.github/workflows/deploy-to-mavencentral.yaml | |
| secrets: | |
| GPG_SECRET: ${{ secrets.GPG_SECRET }} | |
| GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
| MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }} | |
| MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} | |
| push-tag-to-github: | |
| permissions: | |
| contents: write | |
| runs-on: ubuntu-latest | |
| needs: [ recognize-version, publish-to-mavencentral ] | |
| steps: | |
| - name: Create Tag | |
| uses: negz/create-tag@v1 | |
| with: | |
| version: 'v${{ needs.recognize-version.outputs.project-version }}' | |
| message: 'release version ${{ needs.recognize-version.outputs.project-version }}' | |
| token: ${{ secrets.GITHUB_TOKEN }} |