Skip to content

Commit

Permalink
ci: GitHub action
Browse files Browse the repository at this point in the history
  • Loading branch information
matrunchyk committed Mar 4, 2023
1 parent fa92c8d commit 2aae760
Showing 1 changed file with 18 additions and 27 deletions.
45 changes: 18 additions & 27 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,34 +28,25 @@ jobs:
echo ::set-output name=tag::v1.0.$(date +'%Y%m%d%H%M%S')
shell: bash

- name: Create Release
id: create_release
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
files: |
build/libs/MobKillsPlugin-1.0-SNAPSHOT.jar
tag_name: v${{ github.ref }}
name: Release v${{ github.ref }}
files: build/libs/MobKillsPlugin-1.0-SNAPSHOT.jar
draft: false
prerelease: false

- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: MobKillsPlugin
path: build/libs/MobKillsPlugin-1.0-SNAPSHOT.jar

- name: Publish to release
id: publish
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
build/libs/MobKillsPlugin-1.0-SNAPSHOT.jar
token: ${{ secrets.GITHUB_TOKEN }}
name: Release ${{ github.ref }}
tag_name: ${{ github.ref }}
release_id: ${{ env.RELEASE_ID }}
repo: ${{ github.repository }}
asset_name: MobKillsPlugin-${{ github.ref }}.jar
generate_release_notes: true

# - name: Publish to release
# id: publish
# uses: softprops/action-gh-release@v1
# if: startsWith(github.ref, 'refs/tags/')
# with:
# files: |
# build/libs/MobKillsPlugin-1.0-SNAPSHOT.jar
# token: ${{ secrets.GITHUB_TOKEN }}
# name: Release ${{ github.ref }}
# tag_name: ${{ github.ref }}
# release_id: ${{ env.RELEASE_ID }}
# repo: ${{ github.repository }}
# asset_name: MobKillsPlugin-${{ github.ref }}.jar

0 comments on commit 2aae760

Please sign in to comment.