Skip to content

Commit

Permalink
sign on build
Browse files Browse the repository at this point in the history
  • Loading branch information
stelzo committed Mar 31, 2024
1 parent 9f2f2c9 commit 806109e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/generate-sdks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,12 @@ jobs:
run: |
cd java-client
mkdir -p .github/workflows/
printf '%s\n' 'name: Go' 'on:' ' push:' ' branches: [ main ]' ' pull_request:' ' branches: [ main ]' 'jobs:' ' build:' ' runs-on: ubuntu-latest' ' steps:' ' - uses: actions/checkout@v3' ' - name: Set up Java' ' uses: actions/setup-java@v4' ' with:' ' java-version: "17"' ' distribution: "temurin"' ' - name: Verify and test' ' run: mvn --batch-mode --update-snapshots verify && mvn test' > .github/workflows/build.yml
printf '%s\n' 'name: Upload Java Maven Package' 'on:' ' release:' ' types: [created]' 'permissions:' ' contents: read' ' packages: write' 'jobs:' ' deploy:' ' runs-on: ubuntu-latest' ' steps:' ' - uses: actions/checkout@v4' ' - name: Set up Java' ' uses: actions/setup-java@v4' ' with:' ' java-version: "17"' ' distribution: "temurin"' ' server-id: central' ' server-username: MAVEN_USERNAME' ' server-password: MAVEN_PASSWORD' ' - name: Create Key File' ' run: echo "$GPG_PRIVATE_KEY" > private.key' ' env: ' ' GPG_PRIVATE_KEY: secrets.GPG_PRIVATE' ' run: gpg --import --batch private.key' ' - name: Import GPG Key' ' - name: Publish package' ' run: mvn --batch-mode deploy' ' env:' ' MAVEN_USERNAME: secrets.OSSRH_USERNAME' ' MAVEN_PASSWORD: secrets.OSSRH_TOKEN' ' GPG_KEYNAME: secrets.GPG_KEYNAME' > .github/workflows/publish.yml
printf '%s\n' 'name: Go' 'on:' ' push:' ' branches: [ main ]' ' pull_request:' ' branches: [ main ]' 'jobs:' ' build:' ' runs-on: ubuntu-latest' ' steps:' ' - uses: actions/checkout@v3' ' - name: Create Key File' ' run: echo "$GPG_PRIVATE_KEY" > private.key' ' env: ' ' GPG_PRIVATE_KEY: secrets.GPG_PRIVATE' ' - name: Import GPG Key' ' run: gpg --import --batch private.key' ' - name: Set up Java' ' uses: actions/setup-java@v4' ' with:' ' java-version: "17"' ' distribution: "temurin"' ' - name: Verify and test' ' run: mvn --batch-mode --update-snapshots verify && mvn test' > .github/workflows/build.yml
printf '%s\n' 'name: Upload Java Maven Package' 'on:' ' release:' ' types: [created]' 'permissions:' ' contents: read' ' packages: write' 'jobs:' ' deploy:' ' runs-on: ubuntu-latest' ' steps:' ' - uses: actions/checkout@v4' ' - name: Set up Java' ' uses: actions/setup-java@v4' ' with:' ' java-version: "17"' ' distribution: "temurin"' ' server-id: central' ' server-username: MAVEN_USERNAME' ' server-password: MAVEN_PASSWORD' ' - name: Create Key File' ' run: echo "$GPG_PRIVATE_KEY" > private.key' ' env: ' ' GPG_PRIVATE_KEY: secrets.GPG_PRIVATE' ' - name: Import GPG Key' ' run: gpg --import --batch private.key' ' - name: Publish package' ' run: mvn --batch-mode deploy' ' env:' ' MAVEN_USERNAME: secrets.OSSRH_USERNAME' ' MAVEN_PASSWORD: secrets.OSSRH_TOKEN' ' GPG_KEYNAME: secrets.GPG_KEYNAME' > .github/workflows/publish.yml
sed -i 's/secrets.OSSRH_TOKEN/\$\{\{secrets.OSSRH_TOKEN\}\}/g' .github/workflows/publish.yml
sed -i 's/secrets.OSSRH_USERNAME/\$\{\{secrets.OSSRH_USERNAME\}\}/g' .github/workflows/publish.yml
sed -i 's/secrets.GPG_KEYNAME/\$\{\{secrets.GPG_KEYNAME\}\}/g' .github/workflows/build.yml
sed -i 's/secrets.GPG_PRIVATE/\$\{\{secrets.GPG_PRIVATE\}\}/g' .github/workflows/build.yml
sed -i 's/secrets.GPG_KEYNAME/\$\{\{secrets.GPG_KEYNAME\}\}/g' .github/workflows/publish.yml
sed -i 's/secrets.GPG_PRIVATE/\$\{\{secrets.GPG_PRIVATE\}\}/g' .github/workflows/publish.yml
sed -i 's|</description>|</description><url>https://github.com/dofusdude/dofusdude-java</url>|g' pom.xml
Expand Down

0 comments on commit 806109e

Please sign in to comment.