Skip to content

Commit 0b42500

Browse files
committed
ci: Update "nightly" release workflow to run on tag push
… and rename it accordingly because it's no longer for nightlies.
1 parent cb5f065 commit 0b42500

File tree

1 file changed

+8
-32
lines changed

1 file changed

+8
-32
lines changed
Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
name: Nightly Build
1+
name: Release
22

33
on:
4-
schedule:
5-
- cron: '0 0 * * *'
6-
workflow_dispatch:
4+
push:
5+
tags:
6+
- v0.*
7+
- v1.*
78
permissions:
89
contents: write
910

@@ -13,7 +14,7 @@ env:
1314
jobs:
1415
nightly:
1516
runs-on: ubuntu-latest
16-
name: Build nightly release
17+
name: Build release binaries
1718

1819
steps:
1920
- name: Checkout source
@@ -43,36 +44,11 @@ jobs:
4344
tar czvf moss.tar.gz -C ../target/x86_64-unknown-linux-musl/packaging moss
4445
sha256sum moss.tar.gz > moss.tar.gz.sha256
4546
46-
- name: Generate tag
47-
run: |
48-
echo "date=$(date '+%Y%m%d-%H%M%S')" >> $GITHUB_OUTPUT
49-
id: get_date
50-
51-
- name: Push nightly tag
52-
uses: mathieudutour/github-tag-action@v6.1
53-
id: create_tag
54-
with:
55-
github_token: ${{ secrets.GITHUB_TOKEN }}
56-
custom_tag: ${{ steps.get_date.outputs.date }}
57-
tag_prefix: nightly-
58-
5947
- name: Upload binaries to nightly release
6048
uses: svenstaro/upload-release-action@v2
6149
with:
6250
repo_token: ${{ secrets.GITHUB_TOKEN }}
6351
file: release/moss*
6452
file_glob: true
65-
tag: nightly-${{ steps.get_date.outputs.date }}
66-
overwrite: true
67-
prerelease: true
68-
release_name: "Nightly release ${{ steps.get_date.outputs.date }}"
69-
body: "Nightly release of moss"
70-
71-
- name: Clean up old nightly releases
72-
uses: dev-drprasad/delete-older-releases@v0.3.2
73-
with:
74-
keep_latest: 5
75-
delete_tags: true
76-
delete_tag_pattern: nightly
77-
env:
78-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
tag: ${{ github.ref_name }}
54+
release_name: "${{ github.ref_name }}"

0 commit comments

Comments
 (0)