-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (52 loc) · 1.65 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
52
53
54
55
56
57
58
59
60
# Libuvcxx is a header only library, so only the source code needs to be packaged.
name: Release
on:
push:
tags:
- 'r*'
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Make single header
if: success()
run: python3 scripts/merge.py
- name: Package project files
if: success()
run: >
zip -r archives.zip . -x "*.zip"
-x ".gitmodules"
-x ".git/" -x ".git/*"
-x "libuv/" -x "libuv/*"
- name: Get the tag name
if: success()
id: get_tag
run: echo ::set-output name=TAG::${GITHUB_REF#refs/tags/}
- name: Create Release
if: success()
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get_tag.outputs.TAG }}
release_name: Release ${{ steps.get_tag.outputs.TAG }}
body: >
See the
[CHANGELOG](${{ github.server_url }}/${{ github.repository }}/blob/${{ steps.get_tag.outputs.TAG }}/CHANGELOG.md)
for details on this release.
draft: false
prerelease: false
- name: Upload Release Asset
if: success()
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./archives.zip
asset_name: libuvcxx-${{ steps.get_tag.outputs.TAG }}.zip
asset_content_type: application/zip