Creating releases with changelogs on GitHub Actions

Ok, took me way too long for such an unimportant thing, but I like it. The issue was a combo of how GHA does multiline and using the docker vendor cli.

      - name: Release
        id: release
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
        run: |
          rm -Rf ./CHANGELOG.md
          pnpm semantic-release

      - name: Release Replicated
        run: |
          curl -o install.sh -sSL https://raw.githubusercontent.com/replicatedhq/replicated/master/install.sh
          sudo bash ./install.sh
          replicated release create -y --lint --promote ${{ env.GITHUB_REF_SLUG == 'staging' && 'Unstable' || 'Beta' }} --version ${{ steps.release.outputs.version }} --yaml-dir=kots/manifests --release-notes "$(cat ./CHANGELOG.md)"
          replicated installer create -y --promote ${{ env.GITHUB_REF_SLUG == 'staging' && 'Unstable' || 'Beta' }} --yaml-file kots/kurl-installer.yaml
        env:
          REPLICATED_APP: settlemint-bpaas
          REPLICATED_API_TOKEN: ${{ secrets.REPLICATED_API_TOKEN }}
          GITHUB_BRANCH_NAME: ${{ env.GITHUB_REF_SLUG }}
          GITHUB_TAG_NAME: ${{ steps.release.outputs.version }}
1 Like