|
| 1 | +name: Draft Release |
| 2 | +on: |
| 3 | + workflow_dispatch: |
| 4 | + inputs: |
| 5 | + target: |
| 6 | + description: "The owner/repo GitHub target" |
| 7 | + required: true |
| 8 | + branch: |
| 9 | + description: "The branch to target" |
| 10 | + required: true |
| 11 | + version_spec: |
| 12 | + description: "New Version Specifier" |
| 13 | + required: true |
| 14 | + post_version_spec: |
| 15 | + description: "Post Version Specifier" |
| 16 | + required: false |
| 17 | +jobs: |
| 18 | + release: |
| 19 | + runs-on: ubuntu-latest |
| 20 | + strategy: |
| 21 | + fail-fast: true |
| 22 | + matrix: |
| 23 | + python-version: ["3.9"] |
| 24 | + env: |
| 25 | + VERSION_SPEC: ${{ github.event.inputs.version_spec }} |
| 26 | + POST_VERSION_SPEC: ${{ github.event.inputs.post_version_spec }} |
| 27 | + steps: |
| 28 | + - name: Checkout |
| 29 | + uses: actions/checkout@v1 |
| 30 | + - name: Install Python ${{ matrix.python-version }} |
| 31 | + uses: actions/setup-python@v1 |
| 32 | + with: |
| 33 | + python-version: ${{ matrix.python-version }} |
| 34 | + architecture: "x64" |
| 35 | + - name: Upgrade packaging dependencies |
| 36 | + run: | |
| 37 | + pip install --upgrade pip setuptools wheel --user |
| 38 | + - name: Get pip cache dir |
| 39 | + id: pip-cache |
| 40 | + run: | |
| 41 | + echo "::set-output name=dir::$(pip cache dir)" |
| 42 | + - name: Cache pip |
| 43 | + uses: actions/cache@v1 |
| 44 | + with: |
| 45 | + path: ${{ steps.pip-cache.outputs.dir }} |
| 46 | + key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.py') }} |
| 47 | + restore-keys: | |
| 48 | + ${{ runner.os }}-pip-${{ matrix.python-version }}- |
| 49 | + ${{ runner.os }}-pip- |
| 50 | + - name: Install Dependencies |
| 51 | + run: | |
| 52 | + pip install -e . |
| 53 | + - name: Create Draft GitHub Release |
| 54 | + id: draft-release |
| 55 | + uses: ./.github/actions/draft-release |
| 56 | + with: |
| 57 | + token: ${{ secrets.GH_TOKEN }} |
| 58 | + target: ${{ github.event.inputs.target }} |
| 59 | + branch: ${{ github.event.inputs.branch }} |
| 60 | + version_spec: ${{ github.event.inputs.version_spec }} |
| 61 | + post_version_spec: ${{ github.event.inputs.post_version_spec }} |
| 62 | + - name: "** Next Step **" |
| 63 | + run: | |
| 64 | + echo "Run the "Publish Release" Workflow with Release Url:" |
| 65 | + echo ${{ steps.draft-release.outputs.release_url }} |
0 commit comments