Skip to content

Remove maven wrapper #2

Remove maven wrapper

Remove maven wrapper #2

Workflow file for this run

# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
name: Release
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Compile and Package the Maven repository
run: mvn package
# https://docs.github.com/en/rest/releases/releases#create-a-release
# https://docs.github.com/en/rest/releases/assets#upload-a-release-asset
- name: Create release and upload assets
run: |
RELEASE="$(curl \
--silent \
--show-error \
--fail \
--request POST \
--url https://api.github.com/repos/${{github.repository}}/releases \
--data '{"tag_name":"${{github.ref_name}}","name":"${{github.repository}} ${{github.ref_name}}","draft":false,"prerelease":false}' \
--header "Accept: application/vnd.github.v3+json" \
--header "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" | jq '.id')" && \
curl \
--silent \
--show-error \
--fail \
--request POST \
--url https://uploads.github.com/repos/${{github.repository}}/releases/${RELEASE}/assets?name=helloworldjsp.war \
--header "Accept: application/vnd.github.v3+json" \
--header "Content-Type: $(file -b --mime-type target/helloworldjsp.war)" \
--header "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
--data-binary @target/helloworldjsp.war