publish cipd packages to release #2
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: publish cipd packages to release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: 'tag for releases' | |
| required: true | |
| type: string | |
| cipd-ensure-files: | |
| description: 'the target cipd ensure file(s), split by comma. (e.g. gn.ensure)' | |
| required: true | |
| type: string | |
| custom_script: | |
| description: 'use the custom script after downloading cipd package by ensure files' | |
| type: string | |
| jobs: | |
| download: | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: prepare cipd | |
| run: | | |
| git clone https://chromium.googlesource.com/chromium/tools/depot_tools | |
| echo "$GITHUB_WORKSPACE/depot_tools" >> $GITHUB_PATH | |
| - name: make archives of cipd packages | |
| run: python3 -u publish_helper.py --ensure-files ${{ github.event.inputs.cipd-ensure-files }} | |
| - name: generate sha256 list | |
| run: python3 publish_helper.py --sha256-list | |
| - name: run custom script | |
| if: ${{ github.event.inputs.custom_script }} | |
| run: | | |
| bash ${{ github.event.inputs.custom_script }} | |
| - name: push to release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| tag: ${{ github.event.inputs.tag }} | |
| bodyFile: "hash.md" | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| artifacts: "buildtools-*.tar.gz" |