Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upload assets on tag #6318

Merged
merged 12 commits into from
Jul 26, 2022
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: "Build and push artifacts"
on:
push:
tags:
- '*'

jobs:
build:
name: Release artifacts
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set version
run: |
tag_name="${GITHUB_REF##*/}"
tag_value="${tag_name:1}-ice36-b${{ github.run_id }}"
echo "omero.version=$tag_value" >> etc/local.properties
- name: Build and package
run: ./build.py build-dev release-all release-src
sbesson marked this conversation as resolved.
Show resolved Hide resolved
- name: Upload Release Assets
run: |
set -x
assets=()
touch SHASUMS
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does the MD5 file that's in your tag get created? Do we need both?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sbesson and I discussed it and decided to remove the MD5

for asset in ./target/*.zip; do
jburel marked this conversation as resolved.
Show resolved Hide resolved
assets+=("$asset")
filename=$(basename -- "$asset")
sha=$(sha256sum $asset)
IFS=' ' read -r -a array <<< "$sha"
echo "${array[0]} $filename" >> SHASUMS
done
assets+=(SHASUMS)
tag_name="${GITHUB_REF##*/}"
gh release create "$tag_name" "${assets[@]}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ To get started using Eclipse, execute "ant build-dev" and import the top-level
<arg value="${omero.home}/components/antlib/scripts/source-archive.py"/>
<arg value="openmicroscopy"/>
<arg value="${omero.shortversion}"/>
<arg value="${omero.plainversion}"/>
<arg value="${omero.version}"/>
<arg value="${omero.vcs.shortrevision}"/>
<arg value="${omero.vcs.revision}"/>
<arg value="${omero.vcs.date}"/>
Expand All @@ -269,7 +269,7 @@ To get started using Eclipse, execute "ant build-dev" and import the top-level

</target>

<target name="release-src" description="Package the git source tree into openmicroscopy-${omero.plainversion}.zip"
<target name="release-src" description="Package the git source tree into openmicroscopy-${omero.version}.zip"
depends="release-src-embed,release-src-git"/>

<target name="release-clients" description="Zip the Java zip">
Expand Down