package pointmark into FIJI #34
Workflow file for this run
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: package pointmark into FIJI | |
on: | |
workflow_dispatch: | |
release: | |
types: [created] | |
create: | |
tags: | |
- 'v*' | |
jobs: | |
build_jar: | |
name: package pointmark into FIJI | |
runs-on: ubuntu-latest | |
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: copy plugins and macros | |
run: bash ./.github/scripts/collect-jars.sh | |
- name: package for ${{ matrix.fiji_target }} | |
run: bash ./.github/scripts/pkg-${{ matrix.fiji_target }}.sh | |
- name: Check if tag exists | |
id: check_tag | |
run: | | |
TAG_NAME="v${GITHUB_RUN_NUMBER}" | |
if git rev-parse "$TAG_NAME" >/dev/null 2>&1; then | |
echo "TAG_EXISTS=true" >> $GITHUB_ENV | |
else | |
echo "TAG_EXISTS=false" >> $GITHUB_ENV | |
fi | |
- name: Create and push tag if it doesn't exist | |
if: env.TAG_EXISTS == 'false' | |
run: | | |
TAG_NAME="v${GITHUB_RUN_NUMBER}" | |
git tag $TAG_NAME | |
git push origin $TAG_NAME | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- 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: "v${{ github.run_number }}" | |
release_name: Release v${{ github.run_number }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |