name: Deploy on: push: tags: - v* jobs: deploy: runs-on: ubuntu-latest permissions: contents: write pull-requests: write id-token: write steps: - name: Checkout Code uses: actions/checkout@v3 with: fetch-depth: 0 - name: Get previous tag id: previousTag run: | name=$(git --no-pager tag --sort=creatordate --merged ${{ github.ref_name }} | tail -2 | head -1) echo "previousTag: $name" echo "previousTag=$name" >> $GITHUB_ENV - name: Update CHANGELOG id: changelog uses: requarks/changelog-action@v1 with: token: ${{ github.token }} fromTag: ${{ github.ref_name }} toTag: ${{ env.previousTag }} writeToFile: true reverseOrder: true includeInvalidCommits: true useGitmojis: false excludeTypes: build,docs,other,style - name: Create Release uses: ncipollo/release-action@v1.12.0 with: allowUpdates: true draft: true makeLatest: true name: ${{ github.ref_name }} body: ${{ steps.changelog.outputs.changes }} token: ${{ secrets.GITHUB_TOKEN }}