-
Notifications
You must be signed in to change notification settings - Fork 4
79 lines (67 loc) · 2.17 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
name: Release
on:
workflow_dispatch:
inputs:
libs:
description: 'List of libraries to force new releases for'
required: true
type: string
push:
branches: [ main ]
paths:
- "libs/**.luau"
jobs:
CI:
runs-on: ${{ matrix.runner-os }}
name: ${{ matrix.name }}
strategy:
fail-fast: false
matrix:
include:
- name: Windows
runner-os: windows-latest
- name: Linux
runner-os: ubuntu-latest
- name: macOS
runner-os: macos-14
steps:
- uses: CompeyDev/setup-rokit@v0.1.0
- uses: actions/checkout@v4
with:
fetch-depth: ${{ github.event_name == 'pull_request' && 2 || 0 }}
- name: Fetch diff
id: fetch_diff
shell: bash
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
echo "diff=(gh pr diff ${{ github.event.pull_request.number }})" >> .diff
else
echo "diff=$(gh api repos/${{ github.repository }}/commits/${{ github.sha }} --header 'Accept: application/vnd.github.v3.diff')" >> .diff
fi
- name: Install Toolchain
run: rokit install --no-trust-check
- name: Run test runner
run: lune run scripts/test_runner release ${{ inputs.libs }}
Main:
needs: CI
runs-on: ubuntu-latest
steps:
- uses: CompeyDev/setup-rokit@v0.1.0
- uses: actions/checkout@v3
with:
fetch-depth: ${{ github.event_name == 'pull_request' && 2 || 0 }}
- name: Install Toolchain
run: rokit install --no-trust-check
- name: Fetch diff
id: fetch_diff
shell: bash
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
echo "diff=(gh pr diff ${{ github.event.pull_request.number }})" >> .diff
else
echo "diff=$(gh api repos/${{ github.repository }}/commits/${{ github.sha }} --header 'Accept: application/vnd.github.v3.diff')" >> .diff
fi
- name: Run releases script
env:
GH_TOKEN: ${{ github.token }}
run: lune run scripts/release ${{ inputs.libs }}