Skip to content

Commit

Permalink
chore(release): Add weekly release (#938)
Browse files Browse the repository at this point in the history
* chore(release): Add weekly release

* fix(build): Use Nexus instead of Bintray
  • Loading branch information
luispollo authored Mar 23, 2021
1 parent 8a88be1 commit f958666
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/scheduled_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Weekly Release

on:
schedule:
# Every Tuesday at 10 PM UTC (2 PM PST)
- cron: "0 22 * * 2"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch: {}

env:
GRADLE_OPTS: -Dorg.gradle.daemon=false -Xmx2g -Xms2g

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: git fetch --prune --unshallow
- uses: actions/setup-java@v1
with:
java-version: 11
- uses: actions/cache@v1
with:
path: ~/.gradle
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Prepare changelog
id: changelog
uses: TriPSs/conventional-changelog-action@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
output-file: "false"
skip-version-file: "true"
skip-commit: "true"

- name: Release build
env:
ORG_GRADLE_PROJECT_version: ${{ steps.changelog.outputs.version }}
ORG_GRADLE_PROJECT_nexusPublishEnabled: true
ORG_GRADLE_PROJECT_nexusUsername: ${{ secrets.NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_nexusPassword: ${{ secrets.NEXUS_PASSWORD }}
ORG_GRADLE_PROJECT_nexusPgpSigningKey: ${{ secrets.NEXUS_PGP_SIGNING_KEY }}
ORG_GRADLE_PROJECT_nexusPgpSigningPassword: ${{ secrets.NEXUS_PGP_SIGNING_PASSWORD }}
run: |
echo "Building release ${RELEASE_VERSION}"
./gradlew --info publishToNexus closeAndReleaseNexusStagingRepository
- name: Create release
uses: actions/create-release@v1
if: ${{ steps.changelog.outputs.skipped == 'false' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.changelog.outputs.tag }}
release_name: ${{ github.event.repository.name }} ${{ steps.changelog.outputs.tag }}
body: ${{ steps.changelog.outputs.clean_changelog }}
draft: false
prerelease: true

0 comments on commit f958666

Please sign in to comment.