Merge pull request #75 from pigelvy/patch-1 #18
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: Build and deploy release | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
oracle: | |
image: gvenzl/oracle-xe:21-slim | |
env: | |
ORACLE_PASSWORD: oracle | |
ports: | |
- 1521:1521 | |
options: >- | |
--health-cmd healthcheck.sh | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 10 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install utPLSQL | |
run: sh ${{ github.workspace }}/scripts/1_install_utplsql.sh | |
- name: Install demo project | |
run: sh ${{ github.workspace }}/scripts/2_install_demo_project.sh | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
server-id: ossrh | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_PASSWORD | |
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} | |
gpg-passphrase: MAVEN_GPG_PASSPHRASE | |
- name: Cache local Maven repository | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Maven deploy release | |
run: mvn clean deploy -Prelease | |
env: | |
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} | |
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} | |
slack-workflow-status: | |
if: always() | |
name: Post Workflow Status To Slack | |
needs: [ build ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Slack Workflow Notification | |
uses: Gamesight/slack-workflow-status@master | |
with: | |
# Required Input | |
repo_token: ${{secrets.GITHUB_TOKEN}} | |
slack_webhook_url: ${{secrets.SLACK_WEBHOOK_URL}} | |
# Optional Input | |
name: 'Github Actions[bot]' | |
icon_url: 'https://octodex.github.com/images/mona-the-rivetertocat.png' |