diff --git a/.github/workflows/upm.yaml b/.github/workflows/upm.yaml new file mode 100644 index 000000000..d6d94b3b9 --- /dev/null +++ b/.github/workflows/upm.yaml @@ -0,0 +1,41 @@ +name: UPM Pack + +on: + push: + branches: + - main + - 'feature/*' + pull_request: + +jobs: + pack: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Pack dev UPM packages + if: github.event_name == 'pull_request' + run: | + ${{ github.workspace }}/Pipelines/Scripts/pack-upm.ps1 -ProjectRoot: ${{ github.workspace }} -OutputDirectory: ${{ github.workspace }}/build/upm/output -PrereleaseTag: dev -Revision: ${{ github.run_number }} -BuildNumber: ${{ github.run_number }} + shell: pwsh + + - name: Pack preview UPM packages + if: github.event_name == 'push' + run: | + ${{ github.workspace }}/Pipelines/Scripts/pack-upm.ps1 -ProjectRoot: ${{ github.workspace }} -OutputDirectory: ${{ github.workspace }}/build/upm/output -PrereleaseTag: pre -Revision: ${{ github.run_number }} -BuildNumber: ${{ github.run_number }} + shell: pwsh + + - uses: actions/upload-artifact@v4 + if: github.event_name == 'pull_request' + with: + name: packages + path: ${{ github.workspace }}/build/upm/output + retention-days: 1 + + - uses: actions/upload-artifact@v4 + if: github.event_name == 'push' + with: + name: packages + path: ${{ github.workspace }}/build/upm/output + retention-days: 15