forked from Makazzz/VSCodiumPortable
-
Notifications
You must be signed in to change notification settings - Fork 1
69 lines (57 loc) · 2.2 KB
/
build.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
name: Create Release
on:
push:
branches:
- master
workflow_dispatch:
jobs:
create-release:
runs-on: windows-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Get current upstream Tag
id: upstream-tag
run: echo "::set-output name=tag_name::$(pwsh -ExecutionPolicy ByPass -File get-sourcetag.ps1)"
- name: Get current local Tag
id: local-tag
run: echo "::set-output name=tag_name::$(pwsh -ExecutionPolicy ByPass -File get-tag.ps1)"
- name: Clone PortableApps.comInstaller
if: ${{ steps.local-tag.outputs.tag_name != steps.upstream-tag.outputs.tag_name }}
uses: actions/checkout@v4
with:
repository: uroesch/PortableApps.comInstaller
ref: main
path: PortableApps.comInstaller
- name: Clone PortableApps.comLauncher
if: ${{ steps.local-tag.outputs.tag_name != steps.upstream-tag.outputs.tag_name }}
uses: actions/checkout@v4
with:
repository: uroesch/PortableApps.comLauncher
ref: patched
path: PortableApps.comLauncher
- name: Run build script Build.ps1
if: ${{ steps.local-tag.outputs.tag_name != steps.upstream-tag.outputs.tag_name }}
run: pwsh -ExecutionPolicy ByPass -File Build.ps1
timeout-minutes: 20
- name: Create Tag using upstream Tag
if: ${{ steps.local-tag.outputs.tag_name != steps.upstream-tag.outputs.tag_name }}
uses: actions/github-script@v6
env:
TAG: ${{ steps.upstream-tag.outputs.tag_name }}
with:
github-token: ${{ github.token }}
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: "refs/tags/${{ steps.upstream-tag.outputs.tag_name }}",
sha: context.sha
})
- name: Create release
if: ${{ steps.local-tag.outputs.tag_name != steps.upstream-tag.outputs.tag_name }}
uses: ncipollo/release-action@v1
with:
artifacts: '*.paf.exe'
tag: ${{ steps.upstream-tag.outputs.tag_name }}
token: ${{ secrets.GITHUB_TOKEN }}