generated from NOAA-OWP/owp-open-source-project-template
-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (42 loc) · 1.34 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Prepares a commit for release. This will pull the artifacts from the commit tagged for staging
# THIS SHOULD BE THE SAME COMMIT THAT WAS FIRST TAGGED FOR STAGING
name: Release workflow
on:
push:
tags:
- 'v*.*'
- '!v*.*-docker'
run-name: Release ${{ github.ref_name }} for commit ${{ github.event.workflow_run.head_commit.id }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Downloads the pre-release release to copy the artifacts used for testing
- uses: robinraju/release-downloader@v1.10
with:
tag: 'staging'
tarBall: true
zipBall: true
fileName: '*'
# Deletes the pre-release staging release as it is now promoted to release
- uses: dev-drprasad/delete-tag-and-release@v1.1
with:
tag_name: staging
delete_release: true
github_token: ${{ secrets.GITHUB_TOKEN }}
# Tars the project for artifact storage
- name: Tar project
run: |
echo "Tag name from github.ref_name: ${{ github.ref_name }}"
tar -zcvf wres-${{ github.ref_name }}-all-src.tar.gz *
# Generates the release
- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
Release.txt
md5checksum.txt
sha256checksum.txt
*.zip
*.tar.gz