download release #34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Releases | |
on: | |
push: | |
# Sequence of patterns matched against refs/tags | |
branches: | |
- main | |
tags: | |
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
# name: Create Release | |
jobs: | |
release_pointmark: | |
name: Release Pointmark | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
id: release_pointmark | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: JDK Setup | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'adopt' | |
java-version: '11' | |
- name: Build Project | |
run: | | |
pwd | |
ls -la | |
mvn clean | |
- name: Package JAR | |
run: | | |
pwd | |
ls -la | |
mvn package | |
ls -la target | |
- name: Upload JAR Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: pointmark-1.0.${{ env.VERSION_NUMBER }}.jar | |
path: target/CoordinateExporter-0.1.0-SNAPSHOT.jar | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: v1.0.${{ github.run_number }} | |
release_name: v1.0.${{ github.run_number }} | |
body: Packaging for PointMark | |
- name: Set VERSION_NUMBER | |
id: set_version_number | |
run: | | |
echo "VERSION_NUMBER=${{ github.run_number }}" >> $GITHUB_ENV | |
echo "::set-output name=version_number::${{ github.run_number }}" | |
shell: bash | |
- 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: target/CoordinateExporter-0.1.0-SNAPSHOT.jar | |
asset_name: pointmark-1.0.${{ env.VERSION_NUMBER }}.jar | |
asset_content_type: application/java-archive | |
build_jars: | |
name: package pointmark into FIJI | |
runs-on: ubuntu-latest | |
needs: release_pointmark | |
strategy: | |
fail-fast: false | |
matrix: | |
fiji_target: [ linux64, win64, macosx ] | |
steps: | |
- name: checkout repo | |
id: checkout_repo | |
uses: actions/checkout@v4 | |
- name: Fetch all tags | |
run: git fetch --tags | |
- name: List all tags | |
run: git tag | |
- name: setup JDK | |
uses: actions/setup-java@v4 | |
id: jdk_setup | |
with: | |
distribution: 'adopt' | |
java-version: '11' | |
# - name: build JAR | |
# run: bash ./.github/scripts/build-jar.sh | |
- name: Download JAR Artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: pointmark-1.0.${{ env.VERSION_NUMBER }}.jar | |
path: target/ | |
- name: copy plugins and macros | |
run: bash ./.github/scripts/collect-jars.sh ${{ needs.release_pointmark.outputs.version_number }} | |
- name: package for ${{ matrix.fiji_target }} | |
run: bash ./.github/scripts/pkg-${{ matrix.fiji_target }}.sh | |
- name: upload release ZIP | |
id: upload_zip | |
uses: softprops/action-gh-release@v2 | |
with: | |
fail_on_unmatched_files: true | |
prerelease: true | |
files: fiji-${{ matrix.fiji_target }}.zip | |
tag_name: v1.0.${{ github.run_number }} | |
release_name: v1.0.${{ github.run_number }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |