Skip to content

Tag Release

Tag Release #7

Workflow file for this run

name: Tag Release
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
jobs:
checks:
name: Requirements
runs-on: ubuntu-latest
steps:
- name: Check user permissions
uses: 74th/[email protected]
with:
users: dedece35,glalloue,jhertout,jules-delecour-dav,olegoaer,zippy1978,utarwyn
build:
name: Build And Release
runs-on: ubuntu-latest
needs: checks
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Checkout tag "${{ github.ref_name }}"
uses: actions/checkout@v3
with:
ref: ${{ github.ref_name }}
- name: Extract release notes
id: extract-release-notes
uses: ffurrer2/extract-release-notes@v1
- name: Build project
run: ./mvnw -e -B clean package -DskipTests
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: Release ${{ github.ref_name }}
draft: false
prerelease: false
body: ${{ steps.extract-release-notes.outputs.release_notes }}
- name: Export plugin Jar files
id: export_jar_files
uses: actions/upload-artifact@v3
with:
name: creedengo-plugins
path: target
- name: Export UPLOAD_URL
id: export_upload_url
run: echo "upload_url=${{ steps.create_release.outputs.upload_url }}" >> $GITHUB_OUTPUT
upload:
name: Upload Java Plugin
runs-on: ubuntu-latest
needs: build
steps:
- name: Import plugin JAR files
id: import_jar_files
uses: actions/download-artifact@v3
with:
name: creedengo-plugins
path: target
- name: Upload Release Asset - Java Plugin
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{needs.build.outputs.upload_url}}
asset_path: target/creedengo-java-plugin-${{ github.ref_name }}.jar
asset_name: creedengo-java-plugin-${{ github.ref_name }}.jar
asset_content_type: application/zip