File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -25,10 +25,20 @@ jobs:
2525 const onejan = new Date(now.getFullYear(), 0, 1);
2626 /* This is not a ISO-8601 week number but works well for versioning */
2727 const week = Math.ceil((((now.getTime() - onejan.getTime()) / 86400000) + onejan.getDay() + 1) / 7);
28- const result = await github.rest.git.createRef({
28+ const tagName = `v${ now.getFullYear() }.${ week }.0`;
29+ const tag_result = await github.rest.git.createTag({
2930 owner: context.repo.owner,
3031 repo: context.repo.repo,
31- ref: `refs/tags/v${ now.getFullYear() }.${ week }.0`,
32+ tag: tagName,
33+ message: `chore: automatically tagged release ${ tagName }`,
34+ object: context.sha,
35+ type: 'commit',
36+ });
37+ console.log(tag_result);
38+ const ref_result = await github.rest.git.createRef({
39+ owner: context.repo.owner,
40+ repo: context.repo.repo,
41+ ref: `refs/tags/${ tagName }`,
3242 sha: context.sha
3343 });
34- console.log(result );
44+ console.log(ref_result );
You can’t perform that action at this time.
0 commit comments