v2.15.5 #48
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: Upload assets to release | |
on: | |
release: | |
types: [published] | |
jobs: | |
release: | |
name: Upload assets to release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set appVersion | |
uses: bhowell2/github-substring-action@v1 | |
id: appVersion | |
with: | |
value: ${{github.ref}} | |
index_of_str: "refs/tags/v" | |
- run: echo "Version = ${{steps.appVersion.outputs.substring}}" | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 17 | |
cache: gradle | |
- name: Package app | |
run: ./gradlew shadowJar --no-daemon | |
- name: Package preprocessor | |
run: make scriptPkg | |
- name: Upload jar to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ github.ref }} | |
file: build/libs/pharmcat-${{steps.appVersion.outputs.substring}}-all.jar | |
overwrite: true | |
- name: Upload preprocessor to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ github.ref }} | |
file: build/preprocessor.tar.gz | |
asset_name: pharmcat-preprocessor-${{steps.appVersion.outputs.substring}}.tar.gz | |
overwrite: true | |
- name: Upload positions.vcf to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ github.ref }} | |
file: pharmcat_positions.vcf | |
asset_name: pharmcat_positions_${{steps.appVersion.outputs.substring}}.vcf | |
overwrite: true | |
- name: Upload positions.vcf.bgz to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ github.ref }} | |
file: pharmcat_positions.vcf.bgz | |
asset_name: pharmcat_positions_${{steps.appVersion.outputs.substring}}.vcf.bgz | |
overwrite: true | |
- name: Upload positions.vcf.bgz.csi to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ github.ref }} | |
file: pharmcat_positions.vcf.bgz.csi | |
asset_name: pharmcat_positions_${{steps.appVersion.outputs.substring}}.vcf.bgz.csi | |
overwrite: true | |
- name: Upload positions.uniallelic.vcf.bgz to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ github.ref }} | |
file: pharmcat_positions.uniallelic.vcf.bgz | |
asset_name: pharmcat_positions_${{steps.appVersion.outputs.substring}}.uniallelic.vcf.bgz | |
overwrite: true | |
- name: Upload positions.uniallelic.vcf.bgz.csi to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ github.ref }} | |
file: pharmcat_positions.uniallelic.vcf.bgz.csi | |
asset_name: pharmcat_positions_${{steps.appVersion.outputs.substring}}.uniallelic.vcf.bgz.csi | |
overwrite: true | |
- name: Send Slack notification on failure | |
if: failure() | |
uses: slackapi/slack-github-action@v1 | |
with: | |
channel-id: 'dev' | |
payload: | | |
{ | |
"attachments": [{ | |
"color": "#ff0000", | |
"blocks": [ | |
{ | |
"type": "section", | |
"text": { | |
"type": "mrkdwn", | |
"text": ":stop: <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|FAILED ${{ github.workflow }}!>" | |
} | |
}, | |
{ | |
"type": "section", | |
"text": { | |
"type": "mrkdwn", | |
"text": "Triggered by ${{ github.event_name }} on <${{ github.event.pull_request.html_url || github.event.head_commit.url }}|${{ github.ref_name }}> by ${{ github.actor }}." | |
} | |
}, | |
{ | |
"type": "context", | |
"elements": [ | |
{ | |
"type": "mrkdwn", | |
"text": "Last commit:\n${{ github.event.head_commit.message }}" | |
} | |
] | |
} | |
] | |
}] | |
} | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }} |