-
-
Notifications
You must be signed in to change notification settings - Fork 632
49 lines (49 loc) · 1.8 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Release
on:
workflow_dispatch:
inputs:
version:
description: "Release version"
required: true
jobs:
build:
name: "Stable Release"
if: github.repository == 'sdkman/sdkman-cli'
runs-on: ubuntu-latest
environment: production
env:
JRELEASER_GITHUB_TOKEN: ${{ github.token }}
JRELEASER_TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
JRELEASER_TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
JRELEASER_TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
JRELEASER_TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
JRELEASER_MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN}}
services:
mongodb:
image: mongo:3.2
ports:
- 27017:27017
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
cache: 'gradle'
- name: Run tests
run: ./gradlew clean test --info
- name: Build artifacts
run: ./gradlew -Penv=stable -Prelease=${{ github.event.inputs.version }} clean assemble
- name: Release
run: ./gradlew -Penv=stable -Prelease=${{ github.event.inputs.version }} jreleaserFullRelease --exclude-announcer=twitter
- name: Update MongoDB
env:
MONGO_URL: ${{ secrets.MONGO_URL }}
MONGO_USERNAME: ${{ secrets.MONGO_USERNAME }}
MONGO_PASSWORD: ${{ secrets.MONGO_PASSWORD }}
RELEASE_TAG: ${{ github.event.inputs.version }}
run: bin/release-binary.sh "$MONGO_URL" "$MONGO_USERNAME" "$MONGO_PASSWORD" "$RELEASE_TAG" "stable"
- name: Tweet about it
run: ./gradlew -Penv=stable -Prelease=${{ github.event.inputs.version }} jreleaserAnnounce