Deploying from phrase/openapi@2c1908aa #57
Workflow file for this run
This file contains 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: release | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build: | |
name: build | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
java: [ '8' ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v2 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: 'temurin' | |
cache: maven | |
- name: Build with Maven | |
run: mvn -B package --no-transfer-progress --file pom.xml | |
release: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Create GitHub Release | |
uses: ncipollo/release-action@6c75be85e571768fa31b40abf38de58ba0397db5 # [email protected] | |
with: | |
tag: ${{github.event.release.tag_name}} | |
- name: Set up JDK | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '8' | |
distribution: 'temurin' | |
cache: maven | |
- | |
name: Version | |
id: version | |
run: | | |
echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} | |
- | |
name: Install GPG key | |
id: install-gpg-key | |
run: | | |
# Install gpg secret key | |
cat <(echo -e "${{ secrets.GPG_KEY }}") | gpg --batch --import | |
- | |
name: Release Package | |
run: bash ./.github/workflows/release.sh -xe | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
VERSION: ${{ steps.version.outputs.VERSION }} | |
OSSRH_USER: "${{ secrets.OSSRH_USER }}" | |
OSSRH_PASSWORD: "${{ secrets.OSSRH_PASSWORD }}" |