Repository navigation
Merge branch 'dev' of https://github.com/AmyJeanes/Doors into dev #38
Workflow file for this run
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: CI | |
| on: | |
| pull_request_target: | |
| branches: | |
| - dev | |
| push: | |
| branches: | |
| - dev | |
| - renovate/* | |
| workflow_dispatch: | |
| inputs: | |
| publish: | |
| type: boolean | |
| description: Publish to workshop | |
| addon: | |
| type: choice | |
| description: Workshop addon | |
| options: | |
| - beta | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| with: | |
| path: ${{ github.repository }} | |
| - name: Checkout world-portals | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| with: | |
| repository: AmyJeanes/world-portals | |
| ref: dev | |
| path: world-portals | |
| - name: Combine files | |
| run: | | |
| mkdir -p $combined | |
| cp -r ${{ github.workspace }}/world-portals/* $combined | |
| cp -r ${{ github.workspace }}/${{ github.repository }}/* $combined | |
| ls -laR $combined | |
| env: | |
| combined: ${{ github.workspace }}/combined | |
| - name: Set workshop addon id | |
| id: workshop_id | |
| if: (github.event_name == 'push' && contains(fromJSON('["refs/heads/dev"]'), github.ref)) || github.event.inputs.publish == 'true' | |
| run: | | |
| if [[ "${{ github.event.inputs.addon }}" == "beta" || "${{ github.ref }}" == "refs/heads/dev" ]]; then | |
| WORKSHOP_ID=${{ vars.BETA_WORKSHOP_ID }} | |
| else | |
| echo "Unknown workshop ID" 1>&2 | |
| exit 1 | |
| fi | |
| echo "Publishing to workshop ID $WORKSHOP_ID" | |
| echo "WORKSHOP_ID=$WORKSHOP_ID" >> $GITHUB_OUTPUT | |
| - uses: AmyJeanes/gmod-upload@main | |
| name: Publish to workshop | |
| with: | |
| id: ${{ steps.workshop_id.outputs.WORKSHOP_ID }} | |
| changelog: "${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}" | |
| folder: ${{ github.workspace }}/combined | |
| dry-run: ${{ steps.workshop_id.outputs.WORKSHOP_ID == '' }} | |
| env: | |
| STEAM_USERNAME: ${{ vars.STEAM_USERNAME }} | |
| STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }} |