forked from auth0/ad-ldap-connector
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (63 loc) · 2.53 KB
/
semantic-release.yml
File metadata and controls
64 lines (63 loc) · 2.53 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
63
name: Semantic Release
on:
push:
branches:
- master
jobs:
Semantic-Release:
runs-on: windows-latest
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "🔎 The name of your branch is ${{ github.ref }} + ${{ github.event.base_ref }} and your repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@e3d2460bbb42d7710191569f88069044cfb9d8cf #4.2.2
with:
fetch-depth: 0
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
- name: Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 #4.4.0
with:
node-version-file: .nvmrc
- name: Application Dependencies
run: |
npm ci
npm i -g rimraf
- name: Semantic Release
id: semantic_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npx semantic-release
$packageVersion = $(node -e "console.log(require('./package.json').version);")
echo "PACKAGE_VERSION=$packageVersion" >> $env:GITHUB_OUTPUT
echo "Release version is $packageVersion"
shell: pwsh
- name: Installer Dependencies
env:
PACKAGE_VERSION: ${{ steps.semantic_release.outputs.PACKAGE_VERSION }}
if: ${{ steps.semantic_release.outputs.PACKAGE_VERSION != '0.0.0' }}
run: |
$packageVersion = $env:PACKAGE_VERSION
echo "Release version is $packageVersion"
choco install wixtoolset
cd installer
./prepare.ps1
Import-Module "$env:ChocolateyInstall/helpers/chocolateyInstaller.psm1"
refreshenv
shell: pwsh
- name: Build Installer
if: ${{ steps.semantic_release.outputs.PACKAGE_VERSION != '0.0.0' }}
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
PACKAGE_VERSION: ${{ steps.semantic_release.outputs.PACKAGE_VERSION }}
run: |
$packageVersion = $env:PACKAGE_VERSION
echo "Release version is $packageVersion"
cd installer
./build.ps1
mv output/adldap.msi "output/adldap-v$packageVersion.msi"
ls output
gh release upload "v$packageVersion" "output/adldap-v$packageVersion.msi"
shell: pwsh