Skip to content

Update release.yml (#75) #44

Update release.yml (#75)

Update release.yml (#75) #44

name: Release SNAPSHOT
on:
# update SNAPSHOT build whenever a push or merge occurs on master
push:
branches:
- main
env:
SIGNING_KEY_FILE: /home/runner/secretKey.gpg
jobs:
build_aar:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Java
uses: ./.github/actions/setup_java
- name: Decode Signing Key
run: ./ci decode_signing_key
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
- name: Assemble
run: ./ci build
env:
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
# Run unit tests after a successful build
unit_test_browser_switch:
name: Unit Test Browser Switch
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Java
uses: ./.github/actions/setup_java
- name: Run Unit Tests
run: ./ci unit_tests
publish_browser_switch_snapshot:
needs: [ build_aar, unit_test_browser_switch ]
name: Publish SNAPSHOT
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Java
uses: ./.github/actions/setup_java
- name: Decode Signing Key
run: ./ci decode_signing_key
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
- name: Publish SNAPSHOT to Sonatype
run: ./ci publish snapshot
env:
SONATYPE_NEXUS_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
SONATYPE_NEXUS_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
release_finished:
needs: [ publish_browser_switch_snapshot ]
name: Release Finished
runs-on: ubuntu-latest
steps:
- run: echo "Release finished"