Skip to content

Commit

Permalink
Create an entry under GH Releases for built artifacts.
Browse files Browse the repository at this point in the history
- Triggered only when event is not a "pull_request"
- Create a tag "latest" marked as pre-release and attach latest binary
  artifacts from the source branch
- Use actions/download-artifact no-args to fetch all uploaded artifacts
  into their own folder

Signed-off-by: Roland Grunberg <[email protected]>
  • Loading branch information
rgrunber committed Apr 7, 2022
1 parent c195cef commit 72b10c7
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions .github/workflows/native-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@
java: ${{env.GRAALVM_JAVA}}
- run: ./mvnw -B package -Dnative -DskipTests $([ $(uname -s) = Linux ] && echo "-Dgraalvm.static=-H:+StaticExecutableWithDynamicLibC") -Dcbi.jarsigner.skip=true
- run: rm org.eclipse.lemminx/target/*.build_artifacts.txt
- run: mv org.eclipse.lemminx/target/lemminx-* lemminx-$(git rev-parse --short "$GITHUB_SHA")-${{ matrix.label }}
- run: mv org.eclipse.lemminx/target/lemminx-* lemminx-${{ matrix.label }}
- uses: actions/upload-artifact@v2
with:
name: lemminx-${{ matrix.label }}
path: lemminx-*-${{ matrix.label }}
path: lemminx-${{ matrix.label }}
if-no-files-found: error
build-binary-windows:
runs-on: windows-latest
Expand Down Expand Up @@ -79,9 +79,25 @@
graalvm: ${{env.GRAALVM_VERSION}}
java: ${{env.GRAALVM_JAVA}}
- run: .\mvnw.cmd -B package -Dnative -DskipTests -D "cbi.jarsigner.skip=true"
- run: mv org.eclipse.lemminx\target\lemminx-*.exe lemminx-$(git rev-parse --short "$Env:GITHUB_SHA")-win32.exe
- run: mv org.eclipse.lemminx\target\lemminx-*.exe lemminx-win32.exe
- uses: actions/upload-artifact@v2
with:
name: lemminx-win32
path: lemminx-*-win32.exe
path: lemminx-win32.exe
if-no-files-found: error
release-binary-artifacts:
if: github.event_name != 'pull_request'
needs: [build-binary-unix, build-binary-windows]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
- run: for f in lemminx-linux lemminx-darwin lemminx-win32; do pushd ${f} && sha256sum ${f}* > ${f}.sha256 && zip ${f}.zip ${f}* && popd; done
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Development Build"
files: |
lemminx-*/lemminx-*.zip
lemminx-*/lemminx-*.sha256

0 comments on commit 72b10c7

Please sign in to comment.