Files
release-please-manifest-action/.github/workflows/ci.yml
Jim Myhrberg b93407b78f fix(release): create major and minor version tags
This should hopefully fix the 403 errors we got previously.
2023-05-07 22:30:55 +01:00

37 lines
1.4 KiB
YAML

---
name: CI
on: push
jobs:
release-please:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
permissions:
contents: write
steps:
- uses: jimeh/release-please-manifest-action@main
id: release
with:
app-id: ${{ secrets.RELEASE_BOT_APP_ID }}
private-key: ${{ secrets.RELEASE_BOT_PRIVATE_KEY }}
- uses: actions/checkout@v3
if: ${{ steps.release.outputs.release_created }}
- name: Tag major and minor versions
if: ${{ steps.release.outputs.release_created }}
run: |
git config user.name 'jimehbot[bot]'
git config user.email '132453784+jimehbot[bot]@users.noreply.github.com'
git remote add gh-token "https://${GITHUB_TOKEN}@github.com/${{ github.repository }}.git"
git tag -d "$MAJOR_TAG" || true
git tag -d "$MINOR_TAG" || true
git push origin ":${MAJOR_TAG}" || true
git push origin ":${MINOR_TAG}" || true
git tag -a "$MAJOR_TAG" -m "Release ${MAJOR_TAG}"
git tag -a "$MINOR_TAG" -m "Release ${MINOR_TAG}"
git push origin "$MAJOR_TAG"
git push origin "$MINOR_TAG"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}
MAJOR_TAG: v${{ steps.release.outputs.major }}
MINOR_TAG: v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}