|
| 1 | +name: release |
| 2 | +on: |
| 3 | + push: |
| 4 | + tags: |
| 5 | + - '*' |
| 6 | + pull_request: |
| 7 | +jobs: |
| 8 | + build_release: |
| 9 | + runs-on: ubuntu-latest |
| 10 | + steps: |
| 11 | + - uses: actions/checkout@v2 |
| 12 | + - uses: actions/setup-python@v2 |
| 13 | + with: |
| 14 | + python-version: '3.8' |
| 15 | + - name: install requirements |
| 16 | + run: mkdir target && pip install -r requirements.txt -t target |
| 17 | + - name: package |
| 18 | + run: make bundle LATEST_TAG=\${{ github.ref_name }} |
| 19 | + - name: list artifacts |
| 20 | + run: ls -al artifacts |
| 21 | + - name: release |
| 22 | + uses: actions/create-release@v1 |
| 23 | + id: create_release |
| 24 | + with: |
| 25 | + draft: false |
| 26 | + prerelease: false |
| 27 | + release_name: $name$-\${{ github.ref_name }} |
| 28 | + tag_name: \${{ github.ref }} |
| 29 | + env: |
| 30 | + GITHUB_TOKEN: \${{ github.token }} |
| 31 | + - name: upload artifact |
| 32 | + uses: actions/upload-release-asset@v1 |
| 33 | + env: |
| 34 | + GITHUB_TOKEN: \${{ github.token }} |
| 35 | + with: |
| 36 | + upload_url: \${{ steps.create_release.outputs.upload_url }} |
| 37 | + asset_path: artifacts/$name$-\${{ github.ref_name }}.zip |
| 38 | + asset_name: $name$-\${{ github.ref_name }}.zip |
| 39 | + asset_content_type: application/gzip |
| 40 | + - name: upload artifact digest |
| 41 | + uses: actions/upload-release-asset@v1 |
| 42 | + env: |
| 43 | + GITHUB_TOKEN: \${{ github.token }} |
| 44 | + with: |
| 45 | + upload_url: \${{ steps.create_release.outputs.upload_url }} |
| 46 | + asset_path: artifacts/$name$-\${{ github.ref_name }}.zip.base64sha256 |
| 47 | + asset_name: $name$-\${{ github.ref_name }}.zip.base64sha256 |
| 48 | + asset_content_type: application/gzip |
| 49 | + - name: upload artifact version text file |
| 50 | + uses: actions/upload-release-asset@v1 |
| 51 | + env: |
| 52 | + GITHUB_TOKEN: \${{ github.token }} |
| 53 | + with: |
| 54 | + upload_url: \${{ steps.create_release.outputs.upload_url }} |
| 55 | + asset_path: artifacts/latest.version |
| 56 | + asset_name: latest.version |
| 57 | + asset_content_type: application/text |
0 commit comments