diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..d000e40 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,37 @@ +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 + 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_path: ${{ github.workspace }}-CHANGELOG.txt + files: | + ibsim*.tar.gz