-
Notifications
You must be signed in to change notification settings - Fork 0
145 lines (129 loc) · 5.89 KB
/
main.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:
defaults:
run:
shell: pwsh
jobs:
build-and-release:
name: Build & Release
runs-on: [self-hosted, windows, server]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Show Environment
run: |
$PSVersionTable
$pwd
Write-Host Path:
$env:PATH
Write-Host
Write-Host whoami:
whoami
Write-Host
Write-Host Default Environment Variables:
Write-Host "CI: $env:CI"
Write-Host "GITHUB_ACTION: $env:GITHUB_ACTION"
Write-Host "GITHUB_ACTION_PATH: $env:GITHUB_ACTION_PATH"
Write-Host "GITHUB_ACTION_REPOSITORY: $env:GITHUB_ACTION_REPOSITORY"
Write-Host "GITHUB_ACTIONS: $env:GITHUB_ACTIONS"
Write-Host "GITHUB_ACTOR: $env:GITHUB_ACTOR"
Write-Host "GITHUB_ACTOR_ID: $env:GITHUB_ACTOR_ID"
Write-Host "GITHUB_API_URL: $env:GITHUB_API_URL"
Write-Host "GITHUB_BASE_REF: $env:GITHUB_BASE_REF"
Write-Host "GITHUB_ENV: $env:GITHUB_ENV"
Write-Host "GITHUB_EVENT_NAME: $env:GITHUB_EVENT_NAME"
Write-Host "GITHUB_EVENT_PATH: $env:GITHUB_EVENT_PATH"
Write-Host "GITHUB_GRAPHQL_URL: $env:GITHUB_GRAPHQL_URL"
Write-Host "GITHUB_HEAD_REF: $env:GITHUB_HEAD_REF"
Write-Host "GITHUB_JOB: $env:GITHUB_JOB"
Write-Host "GITHUB_PATH: $env:GITHUB_PATH"
Write-Host "GITHUB_REF: $env:GITHUB_REF"
Write-Host "GITHUB_REF_NAME: $env:GITHUB_REF_NAME"
Write-Host "GITHUB_REF_PROTECTED: $env:GITHUB_REF_PROTECTED"
Write-Host "GITHUB_REF_TYPE: $env:GITHUB_REF_TYPE"
Write-Host "GITHUB_REPOSITORY: $env:GITHUB_REPOSITORY"
Write-Host "GITHUB_REPOSITORY_ID: $env:GITHUB_REPOSITORY_ID"
Write-Host "GITHUB_REPOSITORY_OWNER: $env:GITHUB_REPOSITORY_OWNER"
Write-Host "GITHUB_REPOSITORY_OWNER_ID: $env:GITHUB_REPOSITORY_OWNER_ID"
Write-Host "GITHUB_RETENTION_DAYS: $env:GITHUB_RETENTION_DAYS"
Write-Host "GITHUB_RUN_ATTEMPT: $env:GITHUB_RUN_ATTEMPT"
Write-Host "GITHUB_RUN_ID: $env:GITHUB_RUN_ID"
Write-Host "GITHUB_RUN_NUMBER: $env:GITHUB_RUN_NUMBER"
Write-Host "GITHUB_SERVER_URL: $env:GITHUB_SERVER_URL"
Write-Host "GITHUB_SHA: $env:GITHUB_SHA"
Write-Host "GITHUB_STEP_SUMMARY: $env:GITHUB_STEP_SUMMARY"
Write-Host "GITHUB_WORKFLOW: $env:GITHUB_WORKFLOW"
Write-Host "GITHUB_WORKFLOW_REF: $env:GITHUB_WORKFLOW_REF"
Write-Host "GITHUB_WORKFLOW_SHA: $env:GITHUB_WORKFLOW_SHA"
Write-Host "GITHUB_WORKSPACE: $env:GITHUB_WORKSPACE"
Write-Host "RUNNER_ARCH: $env:RUNNER_ARCH"
Write-Host "RUNNER_DEBUG: $env:RUNNER_DEBUG"
Write-Host "RUNNER_NAME: $env:RUNNER_NAME"
Write-Host "RUNNER_OS: $env:RUNNER_OS"
Write-Host "RUNNER_TEMP: $env:RUNNER_TEMP"
Write-Host "RUNNER_TOOL_CACHE: $env:RUNNER_TOOL_CACHE"
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: pnpm
- name: Install
run: pnpm install
- name: Build
run: ./build.ps1
- name: Release
id: release
if: github.ref == 'refs/heads/master'
# v4 doesn't seem to be working, so using a specific commit for now
uses: cycjimmy/semantic-release-action@6d88447fcd3237e1d617f4f663e5ad79a6bf45b1
with:
extra_plugins: |
@semantic-release/changelog
@semantic-release/exec
@semantic-release/git
conventional-changelog-conventionalcommits
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Show Release Output Values
if: github.ref == 'refs/heads/master'
run: |
Write-Host "New Release Published: ${{ steps.release.outputs.new_release_published }}"
Write-Host "New Release Version: ${{ steps.release.outputs.new_release_version }}"
Write-Host "New Release Major Version: ${{ steps.release.outputs.new_release_major_version }}"
Write-Host "New Release Minor Version: ${{ steps.release.outputs.new_release_minor_version }}"
Write-Host "New Release Patch Version: ${{ steps.release.outputs.new_release_patch_version }}"
Write-Host "New Release Channel: ${{ steps.release.outputs.new_release_channel }}"
Write-Host "New Release Notes: ${{ steps.release.outputs.new_release_notes }}"
Write-Host "New Release Git Head: ${{ steps.release.outputs.new_release_git_head }}"
Write-Host "New Release Git Tag: ${{ steps.release.outputs.new_release_git_tag }}"
Write-Host "Last Release Version: ${{ steps.release.outputs.last_release_version }}"
Write-Host "Last Release Git Head: ${{ steps.release.outputs.last_release_git_head }}"
Write-Host "Last Release Git Tag: ${{ steps.release.outputs.last_release_git_tag }}"
- name: Dispatch Scoop Excavator
if: ${{ github.ref == 'refs/heads/master' && steps.release.outputs.new_release_published == 'true' }}
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.SCOOP_NORGATEAV_AMX }}
repository: norgate-av/scoop-norgateav-amx
event-type: excavate
client-payload: |-
{
"repo": {
"name": "${{ github.repository }}",
"owner": "${{ github.repository_owner }}",
"ref": "${{ github.ref }}",
"sha": "${{ steps.release.outputs.new_release_git_head }}",
"tag": "${{ steps.release.outputs.new_release_git_tag }}"
}
}