ISSUE-204: Fix ScaffoldInstaller plugin merge with main #585
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Push Drainpipe Dev Package | |
on: | |
push: | |
branches: | |
- '**' | |
tags: | |
- 'v*' | |
concurrency: | |
group: drainpipe-dev | |
cancel-in-progress: false | |
permissions: | |
contents: read | |
jobs: | |
Drainpipe-Dev: | |
name: Push to drainpipe-dev | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./scaffold/github/actions/common/setup-git | |
with: | |
git-name: Drainpipe Bot | |
git-email: no-reply@example.com | |
- name: Setup SSH | |
uses: webfactory/ssh-agent@v0.9.0 | |
with: | |
ssh-private-key: ${{ secrets.DRAINPIPE_DEV_DEPLOY_KEY }} | |
log-public-key: false | |
- name: Create git checkout of drainpipe-dev | |
working-directory: drainpipe-dev | |
run: | | |
git init | |
git branch -m ${{ github.ref_name }} | |
git remote add origin git@github.com:Lullabot/drainpipe-dev.git | |
git fetch origin | |
- name: Commit changes (Tag) | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
working-directory: drainpipe-dev | |
run: | | |
git reset --mixed origin/main | |
git add -A | |
git commit -m "${{ github.ref_name }}" --allow-empty | |
- name: Commit changes (Branch) | |
if: ${{ ! startsWith(github.ref, 'refs/tags/') }} | |
working-directory: drainpipe-dev | |
run: | | |
git reset --mixed origin/${{ github.ref_name }} || git reset --mixed origin/main | |
git add -A | |
git commit -m "${{ github.event.head_commit.message }}" --allow-empty | |
- name: Tag release | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
working-directory: drainpipe-dev | |
run: | | |
git tag ${{ github.ref_name }} | |
- name: Push to drainpipe-dev | |
working-directory: drainpipe-dev | |
run: | | |
git push origin ${{ github.ref_name }} | |
- name: Create release | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
run: | | |
curl -L \ | |
-X POST \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "Authorization: Bearer ${{ secrets.DRAINPIPE_DEV_RELEASE_TOKEN }}" \ | |
-H "X-GitHub-Api-Version: 2022-11-28" \ | |
https://api.github.com/repos/lullabot/drainpipe-dev/releases \ | |
-d '{"tag_name":"${{ github.ref_name }}","name":"${{ github.ref_name }}","body":"See <a href=\"https://github.com/Lullabot/drainpipe/releases/tag/${{ github.ref_name }}\">https://github.com/Lullabot/drainpipe/releases/tag/${{ github.ref_name }}</a>","draft":false,"prerelease":false,"generate_release_notes":false}' |