Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Commit

Permalink
Release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sfuhrm committed Apr 12, 2021
1 parent e91b995 commit beddb87
Showing 1 changed file with 72 additions and 0 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/maven-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# This release process looks for tags and produces releases.
name: Release

on:
push:
tags:
- 'go-maven-poller-[0-9]+*'

jobs:
build:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
md5sum: ${{ steps.md5sum.outputs.md5sum }}
sha256sum: ${{ steps.sha256sum.outputs.sha256sum }}
env:
DEBIAN_FRONTEND: noninteractive

steps:
- uses: actions/checkout@v2
- name: Set up JDK 8
uses: actions/setup-java@v1
with:
java-version: 8
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Extract current maven version
run: echo "::set-output name=version::$(mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version -q -DforceStdout)"
id: version
shell: bash
- name: Calculate MD5
run: echo "::set-output name=md5sum::$(md5sum -b target/go-maven-poller-plugin.jar | cut -f1 -d" ")"
id: md5sum
shell: bash
- name: Calculate SHA256
run: echo "::set-output name=sha256sum::$(sha256sum -b target/go-maven-poller-plugin.jar | cut -f1 -d" ")"
id: sha256sum
shell: bash
- uses: actions/upload-artifact@v2
with:
name: go-maven-poller-plugin.jar
path: target/go-maven-poller-plugin.jar
- uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: true
body: |
# Release ${{ steps.version.outputs.version }}
## Changes
* 1
* 2
* 3
## Checksums
|Type|Message digest|
|----|--------------|
|MD5|`${{ steps.md5sum.outputs.md5sum }}`|
|SHA256|`${{ steps.sha256sum.outputs.sha256sum }}`|
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: target/go-maven-poller-plugin.jar
asset_name: go-maven-poller-plugin.jar
asset_content_type: application/java-archive

0 comments on commit beddb87

Please sign in to comment.