Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions .github/actions/changelog/action.yml

This file was deleted.

6 changes: 0 additions & 6 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,6 @@ jobs:
YARN_NPM_REGISTRY_SERVER: https://npm.pkg.github.com
YARN_NPM_PUBLISH_REGISTRY: https://npm.pkg.github.com

- name: Changelog
if: ${{ success() && github.event.pull_request.merged == true }}
uses: ./.github/actions/changelog
with:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}

- name: Publish to NPM
if: ${{ success() && (github.event_name == 'workflow_dispatch' || github.event.pull_request.merged == true) }}
id: npm
Expand Down
2 changes: 0 additions & 2 deletions .pnp.cjs

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

1,501 changes: 751 additions & 750 deletions .yarn/releases/yarn.mjs

Large diffs are not rendered by default.

43 changes: 41 additions & 2 deletions code/code-github/src/release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,19 @@ interface ReleaseOptions {

interface CreateOptions {
tag_name: string
target_commitish?: string
body?: string
draft: boolean
make_latest: boolean
name: string
body: string
owner: string
repo: string
}

interface GenerateNotesOptions {
tag_name: string
target_commitish?: string
previous_tag_name?: string
owner: string
repo: string
}
Expand All @@ -26,12 +35,22 @@ export class Release {
}

async create(options: CreateOptions): Promise<number> {
const { owner, repo, tag_name: tagName, name, make_latest: makeLatest, draft, body } = options
const {
owner,
repo,
tag_name: tagName,
target_commitish: targetCommitish,
name,
make_latest: makeLatest,
draft,
body,
} = options

const result = await this.client.repos.createRelease({
owner,
repo,
tag_name: tagName,
target_commitish: targetCommitish,
draft,
make_latest: makeLatest ? 'true' : 'false',
name,
Expand All @@ -40,4 +59,24 @@ export class Release {

return result.status
}

async generateNotes(options: GenerateNotesOptions): Promise<string> {
const {
owner,
repo,
tag_name: tagName,
target_commitish: targetCommitish,
previous_tag_name: previousTagName,
} = options

const result = await this.client.repos.generateReleaseNotes({
owner,
repo,
tag_name: tagName,
target_commitish: targetCommitish,
previous_tag_name: previousTagName,
Comment thread
TorinAsakura marked this conversation as resolved.
})

return result.data.body
}
}
1 change: 0 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1323,7 +1323,6 @@ __metadata:
version: 0.0.0-use.local
resolution: "@atls/yarn-plugin-release@workspace:yarn/plugin-release"
dependencies:
"@atls/code-changelog": "workspace:*"
"@atls/code-github": "workspace:*"
"@atls/yarn-plugin-files": "workspace:*"
"@yarnpkg/builder": "npm:4.2.0"
Expand Down
1,501 changes: 751 additions & 750 deletions yarn/cli/dist/yarn.mjs

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion yarn/plugin-release/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"postpack": "rm -rf dist"
},
"dependencies": {
"@atls/code-changelog": "workspace:*",
"@atls/code-github": "workspace:*",
"@atls/yarn-plugin-files": "workspace:*",
"@yarnpkg/fslib": "3.1.5",
Expand Down
Loading
Loading