Skip to content

Commit

Permalink
moved env and secret setting
Browse files Browse the repository at this point in the history
  • Loading branch information
sdh100shaun committed May 18, 2024
1 parent 49aef66 commit d46d8b0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ jobs:
tag_name: ${{ steps.release.outputs.tag_name }}
release_created: ${{ steps.release.outputs.release_created }}
steps:
- uses: google-github-actions/release-please-action@v4
- uses: googleapis/release-please-action@v4
id: release
with:
release-type: maven



publish:
if: ${{needs.release-please.outputs.release_created}}
runs-on: ubuntu-latest
Expand All @@ -43,12 +42,15 @@ jobs:

push:
if: ${{needs.release-please.outputs.release_created}}
permissions:
contents: read
packages: write

name: Publish to GitHub Packages Apache Maven
uses: ./.github/workflows/maven.yaml
with:
maven-goal: deploy

needs: release-please
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}



6 changes: 6 additions & 0 deletions .github/workflows/maven.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,19 @@ on:
required: true
default: 'package'
type: string
secrets:
GITHUB_TOKEN:
description: 'GitHub token'
required: true

permissions:
contents: read

jobs:
build:
name: build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down

0 comments on commit d46d8b0

Please sign in to comment.