Skip to content

Fix build workflow (hopefully...) #4

Fix build workflow (hopefully...)

Fix build workflow (hopefully...) #4

Workflow file for this run

name: PrivescCheck Update & Build
on:
# Trigger action when a push occurs on the master branch
push:
branches:
- master
# Trigger action manually from GitHub > Actions
workflow_dispatch:
# Trigger action at a given date and time
# schedule:
# - cron: '37 13 * * *'
jobs:
update-data:
name: Update data when required
runs-on: ubuntu-latest
defaults:
run:
shell: pwsh
steps:
- name: Check out master branch
uses: actions/checkout@v5
with:
ref: master
get-release-tag:
name: Get release tag
runs-on: ubuntu-latest
outputs:
release_tag: ${{ steps.get-release-tag.outputs.release_tag }}
steps:
- name: Check out master branch
uses: actions/checkout@v5
with:
ref: master
- name: Get release tag
id: get-release-tag
shell: bash
run: |
echo "release_tag=$(bash ./build/GetReleaseTag.sh)" >> "$GITHUB_OUTPUT"
build-scripts:
name: Build PrivescCheck and its companion scripts
needs: [update-data, get-release-tag]
runs-on: ubuntu-latest
defaults:
run:
shell: pwsh
steps:
- name: Check out master branch
uses: actions/checkout@v5
with:
ref: master
- name: Build PrivescCheck script
run: |
. ./build/Build.ps1; Invoke-Build -Name "PrivescCheck" -NoNewSeed
- name: Build PointAndPrint script
run: |
. ./build/Build.ps1; Invoke-Build -Name "PointAndPrint" -NoNewSeed
- name: Create release
env:
GH_TOKEN: ${{ github.token }}
RELEASE_TAG: ${{ needs.get-release-tag.outputs.release_tag }}
shell: bash
run: |
echo "Using release tag: ${RELEASE_TAG}"
gh release create "${RELEASE_TAG}" ./release/*.ps1