Package Upload Workflow #9
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: Package Upload Workflow | |
| on: | |
| # This workflow can be triggered manually from the GitHub UI | |
| workflow_dispatch: | |
| jobs: | |
| upload-package: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Prepare package data | |
| id: package-data | |
| run: | | |
| echo "Preparing package data..." | |
| # In a real scenario, you would process package data here | |
| echo "message=hello from Hatching-Dev!" >> $GITHUB_OUTPUT | |
| - name: Generate GitHub App token | |
| id: generate-token | |
| uses: tibdex/github-app-token@v2 | |
| with: | |
| app_id: ${{ secrets.HATCH_WORKFLOW_APP_ID }} | |
| private_key: ${{ secrets.HATCH_WORKFLOW_APP_PRIVATE_KEY }} | |
| - name: Trigger Add Package Workflow in Registry | |
| uses: peter-evans/repository-dispatch@v3 | |
| with: | |
| token: ${{ steps.generate-token.outputs.token }} | |
| repository: CrackingShells/Hatch-Registry | |
| event-type: add-package | |
| client-payload: '{"message": "${{ steps.package-data.outputs.message }}"}' |