Skip to content

Give package write permission to workflow #32

Give package write permission to workflow

Give package write permission to workflow #32

Workflow file for this run

name: CMake
permissions:
packages: write
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
include:
- os: macos-latest
nuget: mono `./vcpkg/vcpkg fetch nuget | tail -n 1`
- os: ubuntu-latest
nuget: mono `./vcpkg/vcpkg fetch nuget | tail -n 1`
- os: windows-latest
nuget: nuget
runs-on: ${{matrix.os}}
env:
FEED_URL: https://nuget.pkg.github.com/${{github.repository_owner}}/index.json
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Install Prerequisites Linux
if: ${{matrix.os == 'ubuntu-latest'}}
shell: bash
run: |
${{github.workspace}}/vcpkg/bootstrap-vcpkg.sh
sudo apt install mono-complete
- name: Install Prerequisites macOS
if: ${{matrix.os == 'macos-latest'}}
shell: bash
run: |
brew install mono
${{github.workspace}}/vcpkg/bootstrap-vcpkg.sh
- name: Add NuGet sources
shell: bash
run: |
${{matrix.nuget}} \
sources add \
-Source "${{env.FEED_URL}}" \
-StorePasswordInClearText \
-Name GitHubPackages \
-UserName "${{github.repository_owner}}" \
-Password "${{secrets.GITHUB_TOKEN}}"
${{matrix.nuget}} \
setapikey "${{secrets.GITHUB_TOKEN}}" \
-Source "${{env.FEED_URL}}"
- name: Setup CMake
uses: jwlawson/actions-setup-cmake@802fa1a2c4e212495c05bf94dba2704a92a472be # v2.0.2
with:
cmake-version: '3.31'
- name: Run Workflow
env:
VCPKG_BINARY_SOURCES: "clear;nuget,${{env.FEED_URL}},readwrite"
run: |
cmake --version
cmake --workflow --preset default