-
-
Notifications
You must be signed in to change notification settings - Fork 5
101 lines (83 loc) · 2.93 KB
/
release-tags.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
99
100
101
name: Release New Tags
on:
push:
tags:
- 'v*' # Any pushed tag
jobs:
build:
name: Create Release
runs-on: ${{ matrix.os }}
strategy:
matrix:
# os: [macos-latest, ubuntu-latest, windows-latest]
os: [windows-latest]
node-version: [20.x.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run setup:full
- run: npm run lint
- run: npm run build
- run: cd server && npm run build:package
- uses: little-core-labs/get-git-tag@v3.0.1
id: loadTagName
- uses: pCYSl5EDgo/cat@master
id: loadChangelog
with:
path: CHANGELOG-current.md
- name: Create Release
id: createRelease
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: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: ${{ steps.loadChangelog.outputs.text }}
draft: false
prerelease: false
- name: Upload Server Binary
id: uploadReleaseAsset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.createRelease.outputs.upload_url }}
asset_path: ./server/build/lotr-server.exe
asset_name: lotr-server.exe
asset_content_type: application/vnd.microsoft.portable-executable
#- name: Deploy Server
# uses: AlexxNB/caprover-action@v1
# with:
# server: 'https://captain.server.rair.land'
# password: '${{ secrets.CAPROVER_PASSWORD }}'
# appname: 'game'
#- name: Deploy to Netlify
# uses: nwtgck/actions-netlify@v1.1
# with:
# publish-dir: './client/dist'
# production-branch: master
# github-token: ${{ secrets.GITHUB_TOKEN }}
# deploy-message: "Deploy from GitHub Actions"
# enable-pull-request-comment: false
# enable-commit-comment: true
# overwrites-pull-request-comment: true
# env:
# NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
# NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
#- name: Post to Reddit
# uses: bluwy/release-for-reddit-action@v1
# with:
# username: ${{ secrets.REDDIT_USERNAME }}
# password: ${{ secrets.REDDIT_PASSWORD }}
# app-id: ${{ secrets.REDDIT_APP_ID }}
# app-secret: ${{ secrets.REDDIT_APP_SECRET }}
# subreddit: Rasterkhann
# title: Rasterkhann ${{ steps.loadTagName.outputs.tag }} Update
# comment: ${{ steps.loadChangelog.outputs.text }}
# url: ${{ steps.create_release.outputs.html_url }}
# notification: true