Skip to content

fix perms

fix perms #114

Workflow file for this run

name: build
on:
push:
tags:
- 'v*'
branches:
- master
- develop
pull_request:
branches:
- master
- develop
jobs:
build:
runs-on: macos-latest
permissions:
id-token: write
contents: write
attestations: write
steps:
- name: Checkout Project
uses: actions/checkout@v4
- name: Get the configuration
id: get_configuration
run: |
[ $(echo ${{ github.ref }} | cut -d / -f 2) = "tags" ] && echo "configuration=Release" >> $GITHUB_OUTPUT || echo "configuration=Debug" >> $GITHUB_OUTPUT
- name: build
run: xcodebuild clean build -configuration ${{ steps.get_configuration.outputs.configuration }}
- name: Stage Artifact
run: cd build/${{ steps.get_configuration.outputs.configuration }} && zip -r Polyhedra.saver.zip Polyhedra.saver && shasum -a 256 Polyhedra.saver.zip
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
draft: false
generate_release_notes: true
files: build/${{ steps.get_configuration.outputs.configuration }}/Polyhedra.saver.zip
- name: Attest
uses: actions/attest-build-provenance@v2
with:
subject-path: build/${{ steps.get_configuration.outputs.configuration }}/Polyhedra.saver.zip
- name: Upload Artifact
if: "!startsWith(github.ref, 'refs/tags/')"
uses: actions/upload-artifact@v4
with:
name: PolyhedraSaver-${{ github.sha }}
path: |
build/${{ steps.get_configuration.outputs.configuration }}/
!**/*.zip