forked from diederickh/video_generator
-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (95 loc) · 3.59 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
on:
workflow_dispatch:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
name: Create Release
env:
REPO_NAME: video_generator
PRETTY_NAME: video_generator
jobs:
build-release:
name: Build release
uses: ./.github/workflows/main.yml
create-release:
name: Create Release
runs-on: ubuntu-latest
needs: build-release
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Archive Linux zip results
uses: actions/download-artifact@v3
env:
PLATFORM: linux-x86_64
with:
name: ${{ env.REPO_NAME }}-release-${{ env.PLATFORM }}
path: ./
- name: Create Linux release
env:
PLATFORM: linux-x86_64
shell: bash
run:
mv $REPO_NAME-release-$PLATFORM.zip $REPO_NAME-${{ github.ref_name }}-$PLATFORM.zip
- name: Upload linux release
env:
PLATFORM: linux-x86_64
uses: actions/upload-artifact@v3
with:
name: ${{ env.REPO_NAME }}-${{ env.ref_name }}-${{ github.PLATFORM }}
path: ${{ env.REPO_NAME }}-${{ env.ref_name }}-{{ github.PLATFORM }}.zip
- name: Archive Windows zip results
uses: actions/download-artifact@v3
env:
PLATFORM: windows-x64
with:
name: ${{ env.REPO_NAME }}-release-${{ env.PLATFORM }}
path: ./
- name: Create Windows release
env:
PLATFORM: windows-x64
shell: bash
run:
mv $REPO_NAME-release-$PLATFORM.zip $REPO_NAME-${{ github.ref_name }}-$PLATFORM.zip
- name: Upload Windows release
uses: actions/upload-artifact@v3
env:
PLATFORM: windows-x64
with:
name: ${{ env.REPO_NAME }}-${{ env.ref_name }}-${{ github.PLATFORM }}
path: ${{ env.REPO_NAME }}-${{ env.ref_name }}-{{ github.PLATFORM }}.zip
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: release-${{ github.ref_name }}
release_name: ${{ env.PRETTY_NAME }} ${{ github.ref_name }}
body: |
${{ env.PRETTY_NAME }}-${{ github.ref_name }} has been released. You can find details [here](https://github.com/dabrain34/${{ env.PRETTY_NAME }}/blob/main/Changelog.md)
draft: false
prerelease: false
- name: Upload Linux Release Asset
id: upload-linux-x86_64-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PLATFORM: linux-x86_64
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./${{ env.REPO_NAME }}-${{ github.ref_name }}-${{ env.PLATFORM }}.zip
asset_name: ${{ env.REPO_NAME }}-${{ github.ref_name }}-${{ env.PLATFORM }}.zip
asset_content_type: application/zip
- name: Upload Windows Release Asset
id: upload-win64-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PLATFORM: windows-x64
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./${{ env.REPO_NAME }}-${{ github.ref_name }}-${{ env.PLATFORM }}.zip
asset_name: ${{ env.REPO_NAME }}-${{ github.ref_name }}-${{ env.PLATFORM }}.zip
asset_content_type: application/zip