Skip to content

Commit

Permalink
chore: Update publish-release to use new publish-action changelog fea…
Browse files Browse the repository at this point in the history
…tures
  • Loading branch information
0ffz committed Mar 16, 2024
1 parent 20f7012 commit 9d95926
Showing 1 changed file with 9 additions and 40 deletions.
49 changes: 9 additions & 40 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,72 +26,41 @@ jobs:
cache: gradle

- name: Install FUSE (ubuntu)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt-get install libfuse2 fuse binutils

- name: Grant execute permission for gradlew
run: chmod +x gradlew
if: ${{ matrix.os == 'ubuntu-latest' }}

- name: Run custom gradle package
run: gradle packageForRelease packageReleaseUberJarForCurrentOS
run: gradle packageForRelease

- name: Upload build
uses: actions/upload-artifact@v2
with:
name: build-${{ matrix.os }}
path: 'releases/*'

- name: Get version from gradle
shell: bash
if: ${{ matrix.os == 'ubuntu-latest' }}
id: extract_version
run: |
version=`gradle properties --no-daemon --console=plain -q | grep "^version:" | awk '{printf $2}'`
echo "version=$version" >> $GITHUB_OUTPUT
- name: Create release version artifact
if: ${{ matrix.os == 'ubuntu-latest' }}
shell: bash
run: |
echo "${{ steps.extract_version.outputs.version }}" > version.txt
- name: Upload release version artifact
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: actions/upload-artifact@v2
with:
name: version
path: version.txt

- name: Stop gradle daemon for Windows cache
if: ${{ matrix.os == 'windows-latest' }}
run: gradle --stop
if: ${{ matrix.os == 'windows-latest' }}
publish-release:
needs: [ build ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Download all artifacts
uses: actions/download-artifact@v2
with:
path: artifacts

- name: Read versions file
shell: bash
id: extract_version
run: |
version=`cat artifacts/version/version.txt`
echo "version=$version" >> $GITHUB_OUTPUT
- name: Move all release artifacts into one folder
shell: bash
run: |
mkdir releases
mv artifacts/build*/* releases
- uses: marvinpinto/action-automatic-releases@latest
- uses: MineInAbyss/publish-action@develop
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: "${{ github.ref == 'refs/heads/develop' }}"
automatic_release_tag: v${{ steps.extract_version.outputs.version }}
files: |
release-files: |
releases/*

0 comments on commit 9d95926

Please sign in to comment.