From 36abd4121f7fbcb74fff9db6da7628d7d8413cec Mon Sep 17 00:00:00 2001 From: Amit Gueta Date: Thu, 19 Jan 2023 13:13:56 +0200 Subject: [PATCH 1/2] Add release workflow --- .github/workflows/release.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..ca97e0c --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,27 @@ +name: Publish a release +run-name: ${{ github.actor }} triggered a release upon new tag + +on: + push: + tags: + - "ibsim-*.*" + +jobs: + Release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Build + run: | + ./dist.sh + - name: Test + run: | + test -e ibsim*.tar.gz + - name: Release + uses: softprops/action-gh-release@v0.1.15 + if: startsWith(github.ref, 'refs/tags/') + with: + body: testing a body for release + files: | + ibsim*.tar.gz From 0419a7c166fa0949dbcf8764826e62c5ff2d58c6 Mon Sep 17 00:00:00 2001 From: Amit Gueta Date: Thu, 19 Jan 2023 15:24:02 +0200 Subject: [PATCH 2/2] Update release.yaml --- .github/workflows/release.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ca97e0c..d000e40 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -12,16 +12,26 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + with: + fetch-depth: '0' - name: Build run: | ./dist.sh - name: Test run: | test -e ibsim*.tar.gz + - name: Generate Changelog + run: | + echo "All component versions are from recent master branch." > ${{ github.workspace }}-CHANGELOG.txt + echo "Full list of changes are below:\n" >> ${{ github.workspace }}-CHANGELOG.txt + git shortlog -n $(git tag --sort=-creatordate | grep ibsim- | head -2 | tail -n 1)..HEAD >> ${{ github.workspace }}-CHANGELOG.txt + - name: Print Changelog + run: | + cat ${{ github.workspace }}-CHANGELOG.txt - name: Release uses: softprops/action-gh-release@v0.1.15 if: startsWith(github.ref, 'refs/tags/') with: - body: testing a body for release + body_path: ${{ github.workspace }}-CHANGELOG.txt files: | ibsim*.tar.gz