mirror of
https://github.com/jlengrand/assistant-conversation-java.git
synced 2026-03-10 08:01:24 +00:00
Create first publish workflow. Should trigger only on tags
This commit is contained in:
51
.github/workflows/publish.yml
vendored
Normal file
51
.github/workflows/publish.yml
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
# This workflow will build a Java project with Maven
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
|
||||
|
||||
name: Java CI with Maven
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
- name: Install all and build with Maven
|
||||
run: |
|
||||
mvn -B deploy
|
||||
zip -r assistant-conversation-java.zip target/*.jar
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: package
|
||||
run: mkdir staging && cp target/*.jar staging
|
||||
- uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: Package
|
||||
path: staging
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: Release ${{ github.ref }}
|
||||
draft: false
|
||||
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 }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
|
||||
asset_path: assistant-conversation-java.zip
|
||||
asset_name: assistant-conversation-java.zip
|
||||
asset_content_type: application/zip
|
||||
8
pom.xml
8
pom.xml
@@ -49,4 +49,12 @@
|
||||
<version>2.5.4</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>github</id>
|
||||
<name>GitHub Packages</name>
|
||||
<url>https://maven.pkg.github.com/jlengrand/assistant-conversation-java</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
</project>
|
||||
Reference in New Issue
Block a user