Pre-release for commit 5b07a6e2df5f15b1e999722b17ddd0e91ec47a96 #13
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
# Sets up the pre-release of a deploy for staging testing with the staging tag | |
name: Pre-release | |
on: | |
push: | |
tags: | |
- "staging" | |
run-name: Pre-release for commit ${{ github.sha }} | |
jobs: | |
Create_Pre-release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
# Configure Gradle for optimal use in GiHub Actions, including caching of downloaded dependencies. | |
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 | |
# Run and build using gradle | |
# Disable aggregateJavaDocs | |
- name: Run build | |
run: ./gradlew distZip testCodeCoverageReport javadoc | |
# Confirm the test code inside wres-external-services-tests zip compiles | |
- name: Compile external-services-tests | |
run: | | |
cd wres-external-services-tests | |
../gradlew installDist | |
cd build/install/wres-external-services-tests | |
./gradlew testClasses | |
# Create the system tests zip | |
- name: Create systests zip | |
run: | | |
cd systests | |
../gradlew distZip installDist | |
# Create the admin scripts zip | |
- name: Create admin scripts | |
run: | | |
cd scripts | |
../gradlew distZip | |
# Create the md5 | |
- name: Creating md5 | |
run: | | |
md5sum build/distributions/wres-*.zip >> checksum.txt | |
md5sum wres-*/build/distributions/wres-*-*.zip >> checksum.txt | |
md5sum systests/build/distributions/systests-*.zip >> checksum.txt | |
md5sum scripts/build/distributions/wres-admin-scripts-*.zip >> checksum.txt | |
# Deletes drafts incase the staging tag was deleted to change it to a different commit | |
- name: Delete drafts | |
uses: hugo19941994/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Stores relevant artifacts for the pre-release | |
- name: Create pre-release | |
uses: softprops/action-gh-release@v2 | |
with: | |
prerelease: true | |
files: | | |
checksum.txt | |
Release.txt | |
build/distributions/wres-*.zip | |
wres-*/build/distributions/wres-*-*.zip | |
systests/build/distributions/systests-*.zip | |
scripts/build/distributions/wres-admin-scripts-*.zip | |