Skip to content

Commit 82e3918

Browse files
nat-jsnat-js
authored andcommitted
Add release workflow
1 parent 936fa15 commit 82e3918

File tree

4 files changed

+201
-0
lines changed

4 files changed

+201
-0
lines changed

.github/workflows/release.yml

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
name: Release
2+
on:
3+
release:
4+
types: [published]
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
12+
- name: Package
13+
run: |
14+
mkdir -p ./package/bin/x64/plugins/cyber_engine_tweaks/mods/open_sesame/
15+
cp LICENSE ./package/bin/x64/plugins/cyber_engine_tweaks/mods/open_sesame/
16+
cp init.lua ./package/bin/x64/plugins/cyber_engine_tweaks/mods/open_sesame/
17+
cp README.md ./package/bin/x64/plugins/cyber_engine_tweaks/mods/open_sesame/
18+
19+
- name: Upload Artifacts
20+
uses: actions/upload-artifact@v2
21+
with:
22+
name: package
23+
path: package/
24+
25+
release-github:
26+
runs-on: ubuntu-latest
27+
needs: build
28+
steps:
29+
- uses: actions/checkout@v2
30+
31+
- name: Set environment variables
32+
uses: antifree/json-to-variables@v1.0.1
33+
with:
34+
filename: metadata.json
35+
prefix: META
36+
37+
- name: Download Artifact
38+
uses: actions/download-artifact@v2.0.9
39+
40+
- name: Create zip
41+
uses: ihiroky/archive-action@v1
42+
with:
43+
root_dir: "package/"
44+
file_path: "${{ env.META_MOD_FILE_NAME }}_${{ github.event.release.tag_name }}.zip"
45+
46+
- name: Upload to Github Release
47+
uses: ncipollo/release-action@v1
48+
with:
49+
allowUpdates: true
50+
omitNameDuringUpdate: true
51+
omitBodyDuringUpdate: true
52+
artifacts: "${{ env.META_MOD_FILE_NAME }}_${{ github.event.release.tag_name }}.zip"
53+
token: ${{ secrets.GITHUB_TOKEN }}
54+
55+
release-nexus:
56+
runs-on: ubuntu-latest
57+
needs: build
58+
steps:
59+
- uses: actions/checkout@v2
60+
61+
- name: Update release note
62+
uses: jossef/action-set-json-field@v1
63+
with:
64+
file: metadata.json
65+
field: UNEX_FILEDESCRIPTION
66+
value: ${{ github.event.release.body }}
67+
68+
- name: Set environment variables
69+
uses: antifree/json-to-variables@v1.0.1
70+
with:
71+
filename: metadata.json
72+
prefix: META
73+
74+
- name: Download Artifact
75+
uses: actions/download-artifact@v2.0.9
76+
77+
- name: Create zip
78+
uses: ihiroky/archive-action@v1
79+
with:
80+
root_dir: "package/"
81+
file_path: "${{ env.META_MOD_FILE_NAME }}_${{ github.event.release.tag_name }}.zip"
82+
83+
- name: Setup dotnet
84+
uses: actions/setup-dotnet@v1
85+
with:
86+
dotnet-version: '3.1.x'
87+
88+
- name: Upload to Nexus Mods
89+
env:
90+
UNEX_APIKEY: ${{ secrets.UNEX_APIKEY }}
91+
UNEX_COOKIES: ${{ secrets.UNEX_COOKIES }}
92+
UNEX_GAME: ${{ env.META_UNEX_GAME }}
93+
UNEX_MODID: ${{ env.META_UNEX_MODID }}
94+
UNEX_PREVIOUSFILE: auto
95+
UNEX_FILENAME: ${{ env.META_MOD_FILE_NAME }}_${{ github.event.release.tag_name }}
96+
UNEX_FILEDESCRIPTION: ${{ github.event.release.body }}
97+
UNEX_FILEPATH: ${{ env.META_MOD_FILE_NAME }}_${{ github.event.release.tag_name }}.zip
98+
UNEX_VERSION: ${{ github.event.release.tag_name }}
99+
run: |
100+
dotnet tool install -g NexusUploader
101+
unex upload $UNEX_MODID $UNEX_FILEPATH -v $UNEX_VERSION
102+
103+
release-3dm:
104+
runs-on: ubuntu-latest
105+
needs: build
106+
steps:
107+
- uses: actions/checkout@v2
108+
109+
- name: Set environment variables
110+
uses: antifree/json-to-variables@v1.0.1
111+
with:
112+
filename: metadata.json
113+
prefix: META
114+
115+
- name: Download Artifact
116+
uses: actions/download-artifact@v2.0.9
117+
118+
- name: Create zip
119+
uses: ihiroky/archive-action@v1
120+
with:
121+
root_dir: "package/"
122+
file_path: "${{ env.META_MOD_FILE_NAME }}_${{ github.event.release.tag_name }}.zip"
123+
124+
- name: Upload to 3DM Mods
125+
id: upload_3dm
126+
uses: Nats-ji/3dm-release-action@master
127+
with:
128+
appid: ${{ secrets.APPID_3DM }}
129+
appkey: ${{ secrets.APPKEY_3DM }}
130+
mod_id: ${{ env.META_3DM_MOD_ID }}
131+
mod_title: ${{ env.META_3DM_MOD_TITLE }}
132+
mod_version: ${{ github.event.release.tag_name }}
133+
mod_tags: ${{ env.META_3DM_MOD_TAGS }}
134+
mod_desc: ${{ env.META_3DM_MOD_DESC }}
135+
mod_content: ${{ env.META_3DM_MOD_CONTENT }}
136+
mod_filepath: ${{ env.META_MOD_FILE_NAME }}_${{ github.event.release.tag_name }}.zip
137+
138+
- name: Check 3DM upload status
139+
run: echo ${{ steps.upload_3dm.outputs.RESPONSE }}

.github/workflows/unex_check.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: UNEX Check
4+
5+
# Controls when the action will run.
6+
on:
7+
8+
workflow_dispatch:
9+
10+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
11+
jobs:
12+
# This workflow contains a single job called "build"
13+
check:
14+
# The type of runner that the job will run on
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v2
18+
19+
- name: Setup dotnet
20+
uses: actions/setup-dotnet@v1
21+
with:
22+
dotnet-version: '3.1.x'
23+
24+
- name: Check
25+
env:
26+
UNEX_APIKEY: ${{ secrets.UNEX_APIKEY }}
27+
UNEX_COOKIES: ${{ secrets.UNEX_COOKIES }}
28+
run: |
29+
dotnet tool install -g NexusUploader
30+
unex check

README_zh.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# 功能
2+
- 对上锁的门按对应快捷键可以打开
3+
- 对汽车按对应快捷键可以解锁汽车,有人的车会把他们赶出去。也可以解锁任务中进不去的汽车。偷走朱迪的面包车有惊喜
4+
- 对NPC按对应快捷键杀死NPC
5+
- 对汽车按对应快捷键引爆。连击有惊喜
6+
- 界面吻合游戏主题
7+
- 在控制台里设置快捷键
8+
9+
![](https://mod.3dmgame.com/ueditor/php/upload/image/20210113/1610493663122929.png)
10+
![](https://mod.3dmgame.com/ueditor/php/upload/image/20210113/1610493663740097.png)
11+
12+
# 安装与卸载
13+
1. 确保你已经安装了 Cyber Engine Tweaks 最新版
14+
2. 直接解压缩到游戏根目录里
15+
- 卸载的话删除 <Cyberpunk 2077 根目录>\bin\x64\plugins\cyber_engine_tweaks\mods\open_sesame 文件夹
16+
17+
![](https://mod.3dmgame.com/ueditor/php/upload/image/20210113/1610493500392433.gif)
18+
19+
![](https://mod.3dmgame.com/ueditor/php/upload/image/20210113/1610493500249095.gif)
20+
21+
![](https://mod.3dmgame.com/ueditor/php/upload/image/20210113/1610493500882467.gif)

metadata.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"3DM_MOD_ID": 172143,
3+
"3DM_MOD_TITLE": "芝麻开门MOD(E键开门解锁等等)",
4+
"3DM_MOD_TAGS": "Cyber Engine Tweaks,赛博朋克2077,Cyberpunk 2077,开门,解锁,CET,控制台",
5+
"3DM_MOD_DESC": "使用热键开上锁的门、车门,引爆汽车,杀死NPC",
6+
"3DM_MOD_CONTENT": "README_zh.md",
7+
"UNEX_GAME": "cyberpunk2077",
8+
"UNEX_MODID": 814,
9+
"UNEX_FILEDESCRIPTION": "Check here for release note: https://github.com/Nats-ji/Cyberpunk-Open-Sesame-Mod/releases/latest",
10+
"MOD_FILE_NAME": "open_sesame"
11+
}

0 commit comments

Comments
 (0)