1 name: build and upload artifacts 2 on: 3 push: 4 tags: 5 - "v*" 6 jobs: 7 build-and-upload-artifacts: 8 runs-on: ubuntu-latest 9 steps: 10 - uses: actions/checkout@v2 11 - name: Set up Python 12 uses: actions/setup-python@v2 13 with: 14 python-version: "3.x" 15 - name: Install PackageCore 16 run: | 17 python -m pip install --upgrade pip 18 pip install packagecore 19 - name: Build artifacts with PackageCore 20 run: | 21 version=${GITHUB_REF##*/v} 22 packagecore -o dist/ "$version" 23 - name: Create draft release with artifacts 24 run: | 25 tag=${GITHUB_REF##*/} 26 asset_options=() 27 for asset in dist/*; do 28 asset_options+=(-a "$asset") 29 done 30 hub release create --draft "${asset_options[@]}" --message "googler $tag" "$tag" 31 env: 32 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}