Compare commits

..
1 Commits
Author SHA1 Message Date
github-actions[bot] 2a025e8ab1 v1.3.0 2022-05-10 09:12:12 +00:00
9 changed files with 20 additions and 41 deletions
+2 -2
View File
@@ -12,10 +12,10 @@ jobs:
- name: Checkout Repo - name: Checkout Repo
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Use Node.js 16 - name: Use Node.js 14
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: 16.x node-version: 14.x
- name: Install Dependencies - name: Install Dependencies
run: yarn --frozen-lockfile run: yarn --frozen-lockfile
+2 -2
View File
@@ -14,10 +14,10 @@ jobs:
- name: Checkout Repo - name: Checkout Repo
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Use Node.js 16 - name: Use Node.js 14
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: 16.x node-version: 14.x
- name: Install Dependencies - name: Install Dependencies
run: yarn --frozen-lockfile run: yarn --frozen-lockfile
-12
View File
@@ -1,17 +1,5 @@
# @changesets/action # @changesets/action
## 1.4.0
### Minor Changes
- [#216](https://github.com/changesets/action/pull/216) [`398d7ed`](https://github.com/changesets/action/commit/398d7ed) Thanks [@quinnjn](https://github.com/quinnjn)! - Execute action with node16 instead of node12.
### Patch Changes
- [#228](https://github.com/changesets/action/pull/228) [`bff53cc`](https://github.com/changesets/action/commit/bff53cc50c1ebb33f8f558f9de2e0eb9a99230c6) Thanks [@iansan5653](https://github.com/iansan5653)! - Add `is:pull-request` to search query when looking for existing PR. This fixes an issue with user-owned PATs.
* [#206](https://github.com/changesets/action/pull/206) [`8c3f5f5`](https://github.com/changesets/action/commit/8c3f5f5637a95a2327e78d5dabcf357978aedcbb) Thanks [@glasser](https://github.com/glasser)! - Skip creating a PR when all existing changesets are empty.
## 1.3.0 ## 1.3.0
### Minor Changes ### Minor Changes
+6 -6
View File
@@ -1,6 +1,6 @@
# Changesets Release Action # Changesets Release Action
This action for [Changesets](https://github.com/atlassian/changesets) creates a pull request with all of the package versions updated and changelogs updated and when there are new changesets on [your configured `baseBranch`](https://github.com/changesets/changesets/blob/main/docs/config-file-options.md#basebranch-git-branch-name), the PR will be updated. When you're ready, you can merge the pull request and you can either publish the packages to npm manually or setup the action to do it for you. This action for [Changesets](https://github.com/atlassian/changesets) creates a pull request with all of the package versions updated and changelogs updated and when there are new changesets on master, the PR will be updated. When you're ready, you can merge the pull request and you can either publish the packages to npm manually or setup the action to do it for you.
## Usage ## Usage
@@ -11,7 +11,6 @@ This action for [Changesets](https://github.com/atlassian/changesets) creates a
- commit - The commit message to use. Default to `Version Packages` - commit - The commit message to use. Default to `Version Packages`
- title - The pull request title. Default to `Version Packages` - title - The pull request title. Default to `Version Packages`
- setupGitUser - Sets up the git user for commits as `"github-actions[bot]"`. Default to `true` - setupGitUser - Sets up the git user for commits as `"github-actions[bot]"`. Default to `true`
- createGithubReleases - A boolean value to indicate whether to create Github releases after `publish` or not. Default to `true`
- cwd - Changes node's `process.cwd()` if the project is not located on the root. Default to `process.cwd()` - cwd - Changes node's `process.cwd()` if the project is not located on the root. Default to `process.cwd()`
### Outputs ### Outputs
@@ -31,7 +30,7 @@ name: Release
on: on:
push: push:
branches: branches:
- main - master
concurrency: ${{ github.workflow }}-${{ github.ref }} concurrency: ${{ github.workflow }}-${{ github.ref }}
@@ -67,7 +66,7 @@ name: Release
on: on:
push: push:
branches: branches:
- main - master
concurrency: ${{ github.workflow }}-${{ github.ref }} concurrency: ${{ github.workflow }}-${{ github.ref }}
@@ -116,6 +115,7 @@ For example, you can add a step before running the Changesets GitHub Action:
- name: Creating .npmrc - name: Creating .npmrc
run: | run: |
cat << EOF > "$HOME/.npmrc" cat << EOF > "$HOME/.npmrc"
email=my@email.com
//registry.npmjs.org/:_authToken=$NPM_TOKEN //registry.npmjs.org/:_authToken=$NPM_TOKEN
EOF EOF
env: env:
@@ -134,7 +134,7 @@ name: Release
on: on:
push: push:
branches: branches:
- main - master
jobs: jobs:
release: release:
@@ -176,7 +176,7 @@ name: Release
on: on:
push: push:
branches: branches:
- main - master
concurrency: ${{ github.workflow }}-${{ github.ref }} concurrency: ${{ github.workflow }}-${{ github.ref }}
+1 -1
View File
@@ -1,7 +1,7 @@
name: Changesets name: Changesets
description: A GitHub action to automate releases with Changesets description: A GitHub action to automate releases with Changesets
runs: runs:
using: "node16" using: "node12"
main: "dist/index.js" main: "dist/index.js"
inputs: inputs:
publish: publish:
+7 -7
View File
File diff suppressed because one or more lines are too long
+1 -4
View File
@@ -1,6 +1,6 @@
{ {
"name": "@changesets/action", "name": "@changesets/action",
"version": "1.4.0", "version": "1.3.0",
"main": "dist/index.js", "main": "dist/index.js",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
@@ -20,9 +20,6 @@
"bump": "node ./scripts/bump.js", "bump": "node ./scripts/bump.js",
"release": "node ./scripts/release.js" "release": "node ./scripts/release.js"
}, },
"engines": {
"node": ">= 16"
},
"dependencies": { "dependencies": {
"@actions/core": "^1.3.0", "@actions/core": "^1.3.0",
"@actions/exec": "^1.1.0", "@actions/exec": "^1.1.0",
-6
View File
@@ -37,9 +37,6 @@ const getOptionalInput = (name: string) => core.getInput(name) || undefined;
let publishScript = core.getInput("publish"); let publishScript = core.getInput("publish");
let hasChangesets = changesets.length !== 0; let hasChangesets = changesets.length !== 0;
const hasNonEmptyChangesets = changesets.some(
(changeset) => changeset.releases.length > 0
);
let hasPublishScript = !!publishScript; let hasPublishScript = !!publishScript;
core.setOutput("published", "false"); core.setOutput("published", "false");
@@ -99,9 +96,6 @@ const getOptionalInput = (name: string) => core.getInput(name) || undefined;
} }
return; return;
} }
case hasChangesets && !hasNonEmptyChangesets:
console.log("All changesets are empty; not creating PR");
return;
case hasChangesets: case hasChangesets:
const { pullRequestNumber } = await runVersion({ const { pullRequestNumber } = await runVersion({
script: getOptionalInput("version"), script: getOptionalInput("version"),
+1 -1
View File
@@ -291,7 +291,7 @@ export async function runVersion({
}); });
} }
let searchQuery = `repo:${repo}+state:open+head:${versionBranch}+base:${branch}+is:pull-request`; let searchQuery = `repo:${repo}+state:open+head:${versionBranch}+base:${branch}`;
let searchResultPromise = octokit.search.issuesAndPullRequests({ let searchResultPromise = octokit.search.issuesAndPullRequests({
q: searchQuery, q: searchQuery,
}); });