|
14 | 14 |
|
15 | 15 | # added using https://github.com/step-security/secure-repo |
16 | 16 | permissions: |
17 | | - contents: read |
| 17 | + contents: write |
18 | 18 |
|
19 | 19 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel |
20 | 20 | jobs: |
@@ -580,3 +580,41 @@ jobs: |
580 | 580 | DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} |
581 | 581 | DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} |
582 | 582 | run: sh -x docker/update_description.sh docker/README.md |
| 583 | + |
| 584 | + release: |
| 585 | + name: Create Release |
| 586 | + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') |
| 587 | + needs: [LoadJobs_conf, Fuzzing] |
| 588 | + runs-on: ubuntu-latest |
| 589 | + steps: |
| 590 | + - name: Checkout repository |
| 591 | + uses: actions/checkout@v4 |
| 592 | + with: |
| 593 | + submodules: 'recursive' |
| 594 | + |
| 595 | + - name: Set Environment |
| 596 | + id: job_config |
| 597 | + run: | |
| 598 | + RELEASE_VER="${GITHUB_REF#refs/tags/v}" |
| 599 | + echo "ver=${RELEASE_VER}" >> ${GITHUB_OUTPUT} |
| 600 | + echo "src=rtpproxy-${RELEASE_VER}.tar.gz" >> ${GITHUB_OUTPUT} |
| 601 | +
|
| 602 | + - name: Create source distribution |
| 603 | + run: | |
| 604 | + set -x |
| 605 | + git rev-parse HEAD > revision.txt |
| 606 | + NAME="rtpproxy-${{steps.job_config.outputs.ver}}" |
| 607 | + tar --exclude-vcs --exclude=./tests -czvf /tmp/${{steps.job_config.outputs.src}} \ |
| 608 | + --transform="s|^[.]|${NAME}|" . |
| 609 | + mv /tmp/${{steps.job_config.outputs.src}} ${{steps.job_config.outputs.src}} |
| 610 | +
|
| 611 | + - name: Create Release |
| 612 | + id: create_release |
| 613 | + uses: softprops/action-gh-release@v2 |
| 614 | + env: |
| 615 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 616 | + with: |
| 617 | + files: ./${{steps.job_config.outputs.src}} |
| 618 | + draft: true |
| 619 | + prerelease: false |
| 620 | + generate_release_notes: true |
0 commit comments