Skip to content

Commit

Permalink
ref tag config
Browse files Browse the repository at this point in the history
  • Loading branch information
manquer committed Apr 8, 2024
1 parent 6f25232 commit 9cfa2f8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@
- ✅ Publish release to GH with autogenerated release notes
- [ ] Add comment on relevant PRs and tickets with link to the release notes
- [ ] Assets are published in the release

2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ runs:
- name: publish
shell: bash
if: contains(github.actor,'bot') == false
run: |
run: |
npm install -g auto-changelog
cd ${WORKSPACE}
npm version ${VERSION}
Expand Down
6 changes: 3 additions & 3 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions src/gh-ops.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,13 @@ export async function commit({ base, workspace }: { base: string; workspace: str
parents: [github.context.sha],
tree
})
await ref(`${get(github.context.ref.match(new RegExp('(heads)/([^s]+)')), '0')}`, c.data.sha)
await ref(`refs/tags/v${data.version}`, c.data.sha)

if (base) {
await ref(`${get(base.match(new RegExp('(heads)/([^s]+)')), '0')}`, c.data.sha)
await ref(`refs/${get(base.match(new RegExp('(heads)/([a-z]+)')), '0')}`, c.data.sha)
}
await ref(`refs/tags/v${data.version}`, c.data.sha)
await createRelease(data.version)
await ref(`refs/${get(github.context.ref.match(new RegExp('(heads)/([a-z]+)')), '0')}`, c.data.sha)
return c.data.sha
}

Expand Down

0 comments on commit 9cfa2f8

Please sign in to comment.