|
| 1 | +--- |
| 2 | +name: Release Test |
| 3 | + |
| 4 | +on: |
| 5 | + push: |
| 6 | + tags: |
| 7 | + - "v[0-9]+.[0-9]+.[0-9]+" |
| 8 | + branches: |
| 9 | + - build-* |
| 10 | + |
| 11 | +env: |
| 12 | + TBN_FILENAME: "leet_suite" |
| 13 | + |
| 14 | +jobs: |
| 15 | + create-release: |
| 16 | + name: create-release |
| 17 | + runs-on: ubuntu-latest |
| 18 | +# env: |
| 19 | + # Set to force version number, e.g., when no tag exists. |
| 20 | +# LEET_VERSION: TEST-0.0.4 |
| 21 | + outputs: |
| 22 | + upload_url: ${{ steps.release.outputs.upload_url }} |
| 23 | + leet_version: ${{ env.LEET_VERSION }} |
| 24 | + steps: |
| 25 | + - name: Get the release version from the tag |
| 26 | + shell: bash |
| 27 | + if: env.LEET_VERSION == '' |
| 28 | + run: | |
| 29 | + echo "LEET_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV |
| 30 | + echo "version is: ${{ env.LEET_VERSION }}" |
| 31 | +
|
| 32 | + - name: Download builds and release notes |
| 33 | + uses: actions/download-artifact@v2 |
| 34 | + with: |
| 35 | + path: builds |
| 36 | + |
| 37 | + - name: Create GitHub release |
| 38 | + id: release |
| 39 | + #uses: actions/create-release@v1 |
| 40 | + uses: softprops/action-gh-release@v1 |
| 41 | + env: |
| 42 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token |
| 43 | + with: |
| 44 | + tag_name: ${{ env.LEET_VERSION }} |
| 45 | + release_name: ${{ env.LEET_VERSION }} |
| 46 | + #body_path: ./builds/containerd-release-notes/release-notes.md |
| 47 | + body: | |
| 48 | + Changes in this Release |
| 49 | + - First Change |
| 50 | + - Second Change |
| 51 | + draft: false |
| 52 | + #prerelease: false |
| 53 | + prerelease: ${{ contains(github.ref, 'beta') || contains(github.ref, 'rc') }} |
| 54 | + |
| 55 | + - name: Upload release archive |
| 56 | + if: ${{ startsWith(github.ref, 'refs/tags/v') }} |
| 57 | + uses: softprops/action-gh-release@v1 |
| 58 | + env: |
| 59 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 60 | + with: |
| 61 | + files: | |
| 62 | + builds/${{ TBN_FILENAME }}* |
| 63 | + LICENSE |
| 64 | + README.md |
0 commit comments