-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (50 loc) · 1.67 KB
/
Copy pathbuild.yml
File metadata and controls
63 lines (50 loc) · 1.67 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
name: Release Latest Build
on:
workflow_dispatch:
jobs:
release:
runs-on: macos-latest
steps:
- name: Checkout with submodules
uses: actions/checkout@v4
with:
submodules: true
- name: Make shell script executable
run: chmod +x ./build_mac.sh
- name: Run build script
run: ./build_mac.sh
- name: Set release version
run: echo "VERSION=$(date +"%Y.%m.%d.%H%M%S")" >> $GITHUB_ENV
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: latest-release
name: "GraphScript Installer - ${{ env.VERSION }}"
files: |
GSInstallerMac.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: README
run: |
URL="https://github.com/GraphScript-Labs"
DIR="/installer/releases/download/latest-release/"
FILE="GSInstallerMac.zip"
echo "$URL$DIR$FILE" > README.md
- name: Clean up source files
run: |
find . -mindepth 1 -maxdepth 1 ! -name 'README.md' ! -name '.git' -exec rm -rf {} +
- name: Version File
run: |
date +%s > version
- name: Set up Git
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git checkout --orphan latest-release
- name: Commit and push changes
run: |
git add .
git commit -m "Latest build $(date "+%Y-%m-%d %H:%M:%S")"
git push -f origin latest-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}