forked from ArkScript-lang/Ark
-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (79 loc) · 2.89 KB
/
Copy pathrelease.yml
File metadata and controls
90 lines (79 loc) · 2.89 KB
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
name: "Create a release"
on:
workflow_dispatch:
inputs:
versionName:
description: 'Name of version (ie 5.5.0)'
required: true
isDraft:
description: 'Should we create a draft release?'
required: false
default: 'true'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download artifact Linux GCC
uses: dawidd6/action-download-artifact@v2
with:
workflow: linux-gcc.yml
branch: dev
name: ark-linux-gcc-version
path: ark-linux-gcc-version
- name: Download artifact Windows MSVC
uses: dawidd6/action-download-artifact@v2
with:
workflow: msvc.yml
branch: dev
name: ark-windows-msvc-version
path: ark-windows-msvc-version
- name: Make ZIPs
shell: bash
run: |
(cd ark-linux-gcc-version && zip -r ../linux64.zip ./)
(cd ark-windows-msvc-version && zip -r ../win64.zip ./)
- name: Extract release notes
id: extract-release-notes
uses: ffurrer2/extract-release-notes@v1
- name: Create release
uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ github.event.inputs.versionName }}
release_name: ArkScript v${{ github.event.inputs.versionName }}
draft: ${{ github.event.inputs.isDraft }}
prerelease: false
body: ${{ steps.extract-release-notes.outputs.release_notes }}
- uses: sarisia/actions-status-discord@v1
if: ${{ github.event.inputs.isDraft }} == 'true'
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
title: "A new release (v${{ github.event.inputs.versionName }}) has been drafted"
description: |
Please review it **before publishing it**, as this action would trigger workflows and GitHub webhooks,
notifying everyone of a new release! You want to be sure **everything** is correct
[Release draft URL](${{ steps.create_release.outputs.html_url }})
nodetail: true
username: GitHub Actions
- name: Upload Linux artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./linux64.zip
asset_name: linux64.zip
asset_content_type: application/zip
- name: Upload Windows artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./win64.zip
asset_name: win64.zip
asset_content_type: application/zip