-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (46 loc) · 1.72 KB
/
release-build.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
on:
workflow_dispatch:
inputs:
version:
description: The version to tag the release with, e.g., 1.2.0, 1.2.1-alpha.1
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 14
- name: Login to GitHub Package Registry
run: echo ${{ secrets.CONTAINER_REGISTRY_TOKEN }} | docker login ghcr.io -u anuraaga --password-stdin
- uses: gradle/wrapper-validation-action@v1
- name: Build release with Gradle
uses: burrunan/gradle-cache-action@v1
with:
arguments: build final -Prelease.version=${{ github.event.inputs.version }} --stacktrace
env:
PUBLISH_USERNAME: ${{ github.actor }}
PUBLISH_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
GRGIT_USER: ${{ github.actor }}
GRGIT_PASS: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ github.event.inputs.version }}
release_name: Release v${{ github.event.inputs.version }}
draft: true
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: otelagent/build/libs/aws-opentelemetry-agent-${{ github.event.inputs.version }}.jar
asset_name: aws-opentelemetry-agent.jar
asset_content_type: application/java-archive