Skip to content

Commit

Permalink
fix argument handling and trimming of GITHUB_REF (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
prescottprue authored Dec 4, 2019
1 parent d1ee3dd commit 4264801
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,9 @@ jobs:
- name: Semantic Release
id: semantic # Need an `id` for output variables
uses: cycjimmy/semantic-release-action@v2
extra_plugins: |
@jedmao/semantic-release-npm-github-config
with:
extra_plugins: |
@jedmao/semantic-release-npm-github-config
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
[![Build Status][build-status-image]][build-status-url]
[![Dependency Status][daviddm-image]][daviddm-url]
[![Code Coverage][coverage-image]][coverage-url]

[![License][license-image]][license-url]
[![semantic-release][semantic-release-icon]][semantic-release-url]
[![Code Style][code-style-image]][code-style-url]
Expand Down
5 changes: 3 additions & 2 deletions src/utils/ci.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ function branchNameForGithubAction() {
}
// GITHUB_REF for commits (i.e. refs/heads/master)
if (GITHUB_REF) {
return GITHUB_REF.split('/')[2]
// replace is used in-case the value is passed and does not contain refs/heads/
return GITHUB_REF.replace('refs/heads/', '')
}
}

Expand Down Expand Up @@ -67,7 +68,7 @@ export function getProjectName(opts) {
return get(
firebaserc,
`projects.${projectKey}`,
get(firebaserc, 'projects.master')
get(firebaserc, 'projects.master', get(firebaserc, 'projects.default'))
)
}

Expand Down

0 comments on commit 4264801

Please sign in to comment.