Skip to content

Commit

Permalink
ci: allow release from v4
Browse files Browse the repository at this point in the history
  • Loading branch information
joerivanveen committed Jan 9, 2025
1 parent f0329b6 commit 308445a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 39 deletions.
40 changes: 2 additions & 38 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
name: '🚀 Release'

on:
push:
branches:
- main
- develop
- alpha

workflow_dispatch:

concurrency:
group: release-${{ github.ref }}
group: release-legacy-${{ github.ref }}
cancel-in-progress: true

env:
Expand Down Expand Up @@ -46,7 +40,7 @@ jobs:

deploy-svn:
needs: release
if: github.ref == 'refs/heads/main' && needs.release.outputs.released == 'true'
if: github.ref == 'refs/heads/v4' && needs.release.outputs.released == 'true'
runs-on: ubuntu-22.04
env:
ASSETS_DIR: ./.wordpress-assets
Expand Down Expand Up @@ -80,22 +74,10 @@ jobs:
SLUG: woocommerce-myparcel
VERSION: ${{ steps.prepare.outputs.version }}

rebase-develop:
name: 'Rebase develop onto main'
uses: ./.github/workflows/rebase.yml
secrets: inherit
needs: release
if: always() && github.ref == 'refs/heads/main'
with:
base: 'main'
target: 'develop'
force: ${{ needs.release.outputs.released == 'true' }}

rebase-prs:
name: 'Rebase pull requests'
needs:
- release
- rebase-develop
if: always()
runs-on: ubuntu-22.04
steps:
Expand All @@ -111,21 +93,3 @@ jobs:
base: ${{ github.ref_name }}
exclude-drafts: true
exclude-labels: 'hotfix'

prune-releases:
needs: release
if: github.ref == 'refs/heads/alpha' && needs.release.outputs.released == 'true'
runs-on: ubuntu-22.04
steps:
- uses: myparcelnl/actions/setup-app-credentials@v3
id: credentials
with:
app-id: ${{ secrets.MYPARCEL_APP_ID }}
private-key: ${{ secrets.MYPARCEL_APP_PRIVATE_KEY }}

- uses: dev-drprasad/delete-older-releases@v0.2
with:
keep_latest: 1
delete_tag_pattern: alpha
env:
GITHUB_TOKEN: ${{ steps.credentials.outputs.token }}
2 changes: 1 addition & 1 deletion release.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {
...mainConfig,
extends: '@myparcel/semantic-release-config',
branches: [
{name: 'main'},
{name: 'v4'},
{name: 'develop', prerelease: 'rc', channel: 'rc'},
{name: 'alpha', prerelease: 'alpha', channel: 'alpha'},
],
Expand Down

0 comments on commit 308445a

Please sign in to comment.