why is there still permission issue #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: build | |
| on: | |
| push: | |
| branches: [ "**" ] | |
| workflow_dispatch: | |
| inputs: | |
| release_type: | |
| description: 'draft a release for this build' | |
| required: false | |
| type: choice | |
| options: ['', 'MAJOR', 'MINOR', 'MICRO'] | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| container: devkitpro/devkita64:latest | |
| env: | |
| RELEASE_TYPE: ${{ inputs.release_type }} | |
| outputs: | |
| version_tag: ${{ steps.tag_calc.outputs.tag_name }} | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| filter: blob:none | |
| - name: build | |
| run: | | |
| chown -R $USER:$USER . | |
| echo "=== WHO AM I? ===" | |
| id | |
| echo $USER | |
| echo "=== WHO OWNS THIS DIRECTORY? ===" | |
| ls -ld . | |
| make | |
| mkdir -p dist | |
| mv switch-time.nro dist | |
| - name: tag | |
| id: tag_calc | |
| if: ${{ inputs.release_type != '' }} | |
| run: | | |
| VERSION=$(make version) | |
| echo "tag_name=${VERSION#[^0-9]}" >> $GITHUB_OUTPUT | |
| - name: upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-assets | |
| path: dist/ | |
| release: | |
| needs: build | |
| if: ${{ needs.build.outputs.version_tag != '' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: build-assets | |
| path: dist | |
| - name: draft release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| TAG="${{ needs.build.outputs.version_tag }}" | |
| gh release create "$TAG" dist/* \ | |
| --target ${{ github.sha }} \ | |
| --title "Release $TAG" \ | |
| --generate-notes --draft |