From e1a2c3547e690c56e335552d43fa3b553856ae32 Mon Sep 17 00:00:00 2001 From: Daniel Genis Date: Tue, 31 Oct 2023 11:58:23 +0100 Subject: [PATCH] ci: fix the main branch publish logic --- .github.jsonnet | 2 +- .github/jsonnet/GIT_VERSION | 2 +- .github/jsonnet/complete-workflows.jsonnet | 4 ++-- .github/workflows/publish-prod.yml | 2 +- package.json | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github.jsonnet b/.github.jsonnet index c7b9153..27e68f9 100644 --- a/.github.jsonnet +++ b/.github.jsonnet @@ -13,4 +13,4 @@ local testJob = util.ghJob( runsOn=['ubuntu-latest'], // it's public fork. don't use private runners for public fork ); -util.workflowJavascriptPackage(testJob=testJob) +util.workflowJavascriptPackage(testJob=testJob, branch='master') diff --git a/.github/jsonnet/GIT_VERSION b/.github/jsonnet/GIT_VERSION index 33a0530..78b3ab5 100644 --- a/.github/jsonnet/GIT_VERSION +++ b/.github/jsonnet/GIT_VERSION @@ -1 +1 @@ -afbecf4e8ac7ba526d30b74f71f29f0f287074b1 +966d63a11993bc5df4d6538b678782c28fc2aabb diff --git a/.github/jsonnet/complete-workflows.jsonnet b/.github/jsonnet/complete-workflows.jsonnet index 49a089b..7bd7589 100644 --- a/.github/jsonnet/complete-workflows.jsonnet +++ b/.github/jsonnet/complete-workflows.jsonnet @@ -5,7 +5,7 @@ @param {boolean} checkVersionBump - Whether to assert if the version was bumped (recommended) @param {ghJob} testJob - a job to be ran during PR to assert tests. can be an array of jobs */ - workflowJavascriptPackage(repositories=['gynzy'], isPublicFork=true, checkVersionBump=true, testJob=null):: + workflowJavascriptPackage(repositories=['gynzy'], isPublicFork=true, checkVersionBump=true, testJob=null, branch='main'):: local runsOn = (if isPublicFork then 'ubuntu-latest' else null); $.pipeline( @@ -17,7 +17,7 @@ [ $.yarnPublishJob(repositories=repositories, runsOn=runsOn), ], - event={ push: { branches: ['${{ github.event.pull_request.base.repo.default_branch }}'] } }, + event={ push: { branches: [ branch ] } }, ) + $.pipeline( 'pr', diff --git a/.github/workflows/publish-prod.yml b/.github/workflows/publish-prod.yml index edef13b..40d4959 100644 --- a/.github/workflows/publish-prod.yml +++ b/.github/workflows/publish-prod.yml @@ -71,4 +71,4 @@ "on": "push": "branches": - - "${{ github.event.pull_request.base.repo.default_branch }}" \ No newline at end of file + - "master" \ No newline at end of file diff --git a/package.json b/package.json index 99ef562..903860a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@gynzy/ember-redux", - "version": "6.0.4", + "version": "6.0.3", "description": "ember-cli addon that provides simple redux bindings for ember.js", "scripts": { "build": "ember build",