forked from transloadit/uppy
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* main: (45 commits) Polished the latest update blog (transloadit#3390) docs: fix typo in audio.md (transloadit#3389) website: 2.0-2.3 post draft (transloadit#3370) Release: uppy@2.3.2 (transloadit#3383) meta: fix release script @uppy/core: document file.name (transloadit#3381) add `.npmignore` files to ignore .gitignore when packing (transloadit#3380) meta: add VSCode workspace settings to `.gitignore` Upgrade ws in companion (transloadit#3377) meta: use ESBuild to bundle in E2E test suite (transloadit#3375) meta: update linter config to parse ESM files (transloadit#3371) meta: move dev workspace to `private/` (transloadit#3368) meta: use Vite for examples/dev (transloadit#3361) website: remove dependency on `crypto` in @uppy/transloadit example (transloadit#3367) tools: enable linter on website examples (transloadit#3366) meta: enable linter on mjs scripts (transloadit#3364) Fix module field in @uppy/angular package.json (transloadit#3365) Release: uppy@2.3.1 (transloadit#3357) meta: improve release script wording and formatting meta: update npm deps (transloadit#3352) ...
- Loading branch information
Showing
248 changed files
with
13,166 additions
and
28,208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
**/node_modules | ||
.git | ||
website | ||
assets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Manually triggered CDN upload | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
name: | ||
description: "Package to upload" | ||
required: true | ||
default: "uppy" | ||
|
||
jobs: | ||
upload: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
- name: Cache npm dependencies | ||
id: cache-npm-libraries | ||
uses: actions/cache@v2 | ||
with: | ||
path: .yarn/cache/* | ||
key: ${{ runner.os }} | ||
- name: Install Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16.x | ||
- name: Install dependencies | ||
run: corepack yarn install | ||
- name: Build before publishing | ||
run: corepack yarn run build | ||
- name: Upload `${{ github.event.inputs.name }}` to CDN | ||
run: corepack yarn run uploadcdn ${{ github.event.inputs.name }} | ||
env: | ||
EDGLY_KEY: ${{secrets.EDGLY_KEY}} | ||
EDGLY_SECRET: ${{secrets.EDGLY_SECRET}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: Release candidate | ||
on: | ||
push: | ||
branches: release | ||
|
||
jobs: | ||
prepare-release: | ||
name: Prepare release candidate Pull Request | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
with: | ||
branch: release | ||
- name: Rebase | ||
run: | | ||
git fetch origin HEAD --depth=1 | ||
git config --global user.email "actions@github.com" | ||
git config --global user.name "GitHub Actions" | ||
git rebase FETCH_HEAD | ||
- name: Cache npm dependencies | ||
id: cache-npm-libraries | ||
uses: actions/cache@v2 | ||
with: | ||
path: .yarn/cache/* | ||
key: ${{ runner.os }} | ||
- name: Install Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16.x | ||
- name: Install dependencies | ||
run: corepack yarn install | ||
- name: Bump candidate packages version | ||
run: corepack yarn version apply --all --json | jq -s > releases.json | ||
- name: Prepare changelog | ||
run: corepack yarn workspace @uppy-dev/release update-changelogs releases.json | xargs git add | ||
- name: Update contributors table | ||
run: corepack yarn contributors:save && git add README.md | ||
- name: Update CDN URLs | ||
run: corepack yarn workspace @uppy-dev/release update-version-URLs | xargs git add | ||
- name: Stage changes and remove temp files | ||
run: | | ||
git rm -rf .yarn/versions | ||
git rm CHANGELOG.next.md | ||
jq -r 'map(.cwd) | join("\n")' < releases.json | awk '{ print "git add " $0 "/package.json" }' | sh | ||
- name: Commit | ||
run: | | ||
echo "Release: uppy@$(jq -r 'map(select(.ident == "uppy"))[0].newVersion' < releases.json)" > commitMessage | ||
echo >> commitMessage | ||
echo "This is a release candidate for the following packages:" >> commitMessage | ||
echo >> commitMessage | ||
jq -r 'map("- `"+.ident+"`: "+.oldVersion+" -> "+.newVersion) | join("\n") ' < releases.json >> commitMessage | ||
git commit -n --amend --file commitMessage | ||
- name: Open Pull Request | ||
id: pr_opening | ||
run: | | ||
git push origin HEAD:release-candidate | ||
gh api repos/${{ github.repository }}/pulls \ | ||
-F base="$(gh api /repos/${{ github.repository }} | jq -r .default_branch)" \ | ||
-F head="release-candidate" \ | ||
-F title="$(head -1 commitMessage)" \ | ||
-F body="$(git --no-pager diff HEAD^ -- CHANGELOG.md | awk '{ if( substr($0,0,1) == "+" && $1 != "+##" && $1 != "+Released:" && $1 != "+++" ) { print substr($0,2) } }')" \ | ||
--jq '.number | tostring | "##[set-output name=pr_number;]"+.' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Assign to the releaser | ||
run: echo '{"assignees":[${{ toJSON(github.actor) }}]}' | gh api repos/${{ github.repository }}/issues/${{ steps.pr_opening.outputs.pr_number }}/assignees --input - | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Enable Release workflow | ||
run: gh workflow enable Release --repo ${{ github.repository }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
name: Release | ||
on: | ||
pull_request_review: | ||
types: [submitted] | ||
|
||
jobs: | ||
release: | ||
name: Publish releases | ||
if: ${{ github.event.review.state == 'approved' && github.event.sender.login == github.event.pull_request.assignee.login && github.event.pull_request.head.ref == 'release-candidate' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 2 | ||
- name: Cache npm dependencies | ||
id: cache-npm-libraries | ||
uses: actions/cache@v2 | ||
with: | ||
path: .yarn/cache/* | ||
key: ${{ runner.os }} | ||
- name: Install Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16.x | ||
- name: Install dependencies | ||
run: corepack yarn install | ||
- name: Get CHANGELOG diff | ||
run: git --no-pager diff HEAD^ -- CHANGELOG.md | awk '{ if( substr($0,0,1) == "+" && $1 != "+##" && $1 != "+Released:" && $1 != "+++" ) { print substr($0,2) } }' > CHANGELOG.diff.md | ||
- name: Copy README for `uppy` package | ||
run: cp README.md packages/uppy/. | ||
- name: Build before publishing | ||
run: corepack yarn run build | ||
- name: Login to NPM | ||
run: corepack yarn config set npmAuthToken ${{ toJSON(secrets.NPM_TOKEN) }} | ||
- name: Publish to NPM | ||
run: corepack yarn workspaces foreach --no-private npm publish --access public --tolerate-republish | ||
- name: Merge PR | ||
id: merge | ||
run: | | ||
gh api -X PUT repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/merge \ | ||
-F merge_method="squash" \ | ||
-F commit_message="$(cat CHANGELOG.diff.md)" \ | ||
--jq 'if .merged then "##[set-output name=sha;]"+.sha else error("not merged") end' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Create tags | ||
run: | | ||
git --no-pager diff --name-only HEAD^ | awk '$0 ~ /^packages\/.+\/package\.json$/ { print "jq -r '"'"'\"gh api /repos/{owner}/{repo}/git/refs -f ref=\\\"refs/tags/\"+.name+\"@\"+.version+\"\\\" -f sha=${{ steps.merge.outputs.sha }}\"'"'"' < " $0 }' > createTags.sh | ||
cat createTags.sh | ||
sh createTags.sh | sh | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Get Uppy version number | ||
id: uppyVersion | ||
run: jq -r '"##[set-output name=version;]"+.version' < packages/uppy/package.json | ||
- name: Create GitHub release | ||
run: gh release create uppy@${{ steps.uppyVersion.outputs.version }} -t "Uppy ${{ steps.uppyVersion.outputs.version }}" -F CHANGELOG.diff.md | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Upload `uppy` to CDN | ||
run: corepack yarn run uploadcdn uppy | ||
env: | ||
EDGLY_KEY: ${{secrets.EDGLY_KEY}} | ||
EDGLY_SECRET: ${{secrets.EDGLY_SECRET}} | ||
- name: Upload `@uppy/robodog` to CDN if it was released | ||
run: git diff --exit-code --quiet HEAD^ -- packages/@uppy/robodog/package.json || corepack yarn run uploadcdn @uppy/robodog | ||
env: | ||
EDGLY_KEY: ${{secrets.EDGLY_KEY}} | ||
EDGLY_SECRET: ${{secrets.EDGLY_SECRET}} | ||
- name: Upload `@uppy/locales` to CDN if it was released | ||
run: git diff --exit-code --quiet HEAD^ -- packages/@uppy/locales/package.json ||corepack yarn run uploadcdn @uppy/locales | ||
env: | ||
EDGLY_KEY: ${{secrets.EDGLY_KEY}} | ||
EDGLY_SECRET: ${{secrets.EDGLY_SECRET}} | ||
- name: Remove release-candidate branch | ||
run: gh api -X DELETE repos/${{ github.repository }}/git/refs/heads/release-candidate || echo "Already deleted" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Remove release branch | ||
run: gh api -X DELETE repos/${{ github.repository }}/git/refs/heads/release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Disable Release workflow | ||
run: gh workflow disable Release --repo ${{ github.repository }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: In case of failure | ||
if: ${{ failure() }} | ||
run: gh pr comment ${{ github.event.pull_request.number }} --body "Release job failed, please take action." | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.