Skip to content

Merge pull request #237 from DeployGate/dependabot/gradle/net.bytebud… #16

Merge pull request #237 from DeployGate/dependabot/gradle/net.bytebud…

Merge pull request #237 from DeployGate/dependabot/gradle/net.bytebud… #16

Workflow file for this run

name: Release artifacts
on:
push:
tags:
- \d.\d.\d
- \d.\d.\d-(alpha|rc)\d\d
jobs:
production-release:
runs-on: ubuntu-latest
services:
app:
image: ghcr.io/deploygate/deploygate-mock-server:main
ports:
- 3000/tcp
options: >-
--health-cmd "curl -fI http://localhost:3000"
--health-interval 15s
--health-timeout 5s
--health-retries 5
--health-start-period 20s
steps:
- uses: actions/checkout@v4
with:
ref: master
- uses: actions/checkout@v4
- run: |
if [[ "$(cat src/main/resources/VERSION)" != "${GITHUB_REF#refs/tags/}" ]]; then
echo "version must keep the consistency" 1>&2
exit 1
fi
- uses: ./.github/actions/setup-java
- name: Set up gradle.properties for signing and nexus
# Add timeout setting due to https://github.com/DeployGate/gradle-deploygate-plugin/runs/2523846388
run: |
echo >> gradle.properties
cat<<EOF >> gradle.properties
systemProp.org.gradle.internal.http.socketTimeout=120000
nexusUsername=${{ secrets.SHARED_NEXUS_TOKEN_USERNAME }}
nexusPassword=${{ secrets.SHARED_NEXUS_TOKEN_USERNAME }}
EOF
- name: Publish artifacts
run: ./release.sh
env:
TEST_SERVER_URL: http://localhost:${{ job.services.app.ports[3000] }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_SECRET_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSPHRASE }}
- name: Slack Notification
# we use specific version(v2.2.1) for avoid nested dependency
uses: rtCamp/action-slack-notify@b24d75fe0e728a4bf9fc42ee217caa686d141ee8 # v2.2.1
env:
SLACK_TITLE: 'Gradle Plugin Release'
SLACK_MESSAGE: "${{ github.ref }} has been published to Sonatype. ref: https://oss.sonatype.org/"
SLACK_WEBHOOK: ${{ secrets.SHARED_FOR_RELEASE_ARTIFACT_SLACK_INCOMING_WEBHOOK_URL }}