Update dependency @vercel/ncc to v0.38.1 - autoclosed #1077
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
# IMPORTANT NOTE/WARNING! | |
# Do not make changes to this file, your changes will be overwritten. | |
# | |
# This file is automagically generated from: | |
# - .github/templates/pull_request.yml.erb | |
# - Templates contained in the smartlyio/github-actions-templates repository | |
# | |
# This file can be updated by editing the template file, and running `devbox render workflows` | |
name: "Pull Request" | |
on: | |
pull_request: | |
branches: [master] | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set Node.js 16.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
- name: "Install" | |
run: | | |
npm install | |
- name: "Prettier" | |
run: | | |
npm run format-check | |
- name: "Lint" | |
run: | | |
npm run lint | |
- name: "Test" | |
run: | | |
npm run test | |
- name: "build" | |
run: | | |
npm run build | |
npm run package | |
test: | |
runs-on: ubuntu-22.04 | |
env: | |
EMAIL_INPUT: [email protected] | |
USERNAME_INPUT: example-test | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set Node.js 16.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
- name: "Build action for test" | |
run: | | |
npm install | |
npm run build | |
npm run package | |
git clean -fXd | |
- uses: webiny/[email protected] | |
with: | |
run: .github/scripts/test_post.sh | |
- name: Test executing the action | |
uses: ./ | |
env: | |
GIT_DEPLOY_KEY: not-a-real-key | |
AUTH_TOKEN_STRING: | | |
email = [email protected] | |
with: | |
email: ${{ env.EMAIL_INPUT }} | |
username: ${{ env.USERNAME_INPUT }} | |
- run: | | |
set -u | |
cat "$RUNNER_TEMP/setup-npm-publish-action/id_rsa" | |
echo | |
git config user.name | |
git config user.email | |
git remote get-url origin | |
git config core.sshCommand | |
grep '^github\.com' "$RUNNER_TEMP/setup-npm-publish-action/known_hosts" | |
[[ "$(cat "$RUNNER_TEMP/setup-npm-publish-action/id_rsa")" == "not-a-real-key" ]] | |
[[ "$(git config user.name)" == "${{ env.USERNAME_INPUT }}" ]] | |
[[ "$(git config user.email)" == "${{ env.EMAIL_INPUT }}" ]] | |
[[ "$(git remote get-url origin)" == "[email protected]:$GITHUB_REPOSITORY.git" ]] | |
# Just check that it is altered from default | |
[[ "$(git config core.sshCommand)" == *UserKnownHostsFile* ]] | |
test-cleanup-non-repo: | |
runs-on: ubuntu-22.04 | |
env: | |
EMAIL_INPUT: [email protected] | |
USERNAME_INPUT: example-test | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set Node.js 16.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
- name: "Build action for test" | |
run: | | |
npm install | |
npm run build | |
npm run package | |
git clean -fXd | |
- uses: webiny/[email protected] | |
with: | |
run: .github/scripts/test_missing_npmrc_post.sh | |
- name: Test executing the action | |
uses: ./ | |
env: | |
GIT_DEPLOY_KEY: not-a-real-key | |
AUTH_TOKEN_STRING: | | |
email = [email protected] | |
with: | |
email: ${{ env.EMAIL_INPUT }} | |
username: ${{ env.USERNAME_INPUT }} | |
- run: | | |
set -u | |
cat "$RUNNER_TEMP/setup-npm-publish-action/id_rsa" | |
echo | |
git config user.name | |
git config user.email | |
git remote get-url origin | |
git config core.sshCommand | |
grep '^github\.com' "$RUNNER_TEMP/setup-npm-publish-action/known_hosts" | |
[[ "$(cat "$RUNNER_TEMP/setup-npm-publish-action/id_rsa")" == "not-a-real-key" ]] | |
[[ "$(git config user.name)" == "${{ env.USERNAME_INPUT }}" ]] | |
[[ "$(git config user.email)" == "${{ env.EMAIL_INPUT }}" ]] | |
[[ "$(git remote get-url origin)" == "[email protected]:$GITHUB_REPOSITORY.git" ]] | |
# Just check that it is altered from default | |
[[ "$(git config core.sshCommand)" == *UserKnownHostsFile* ]] | |
- run: rm -rf .git | |
test-missing-npmrc: | |
runs-on: ubuntu-22.04 | |
env: | |
EMAIL_INPUT: [email protected] | |
USERNAME_INPUT: example-test | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set Node.js 16.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
- name: "Build action for test" | |
run: | | |
npm install | |
npm run build | |
npm run package | |
git clean -fXd | |
- run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Testing" | |
git rm .npmrc | |
git commit -m "mark removed npmrc file" | |
- uses: webiny/[email protected] | |
with: | |
run: .github/scripts/test_missing_npmrc_post.sh | |
- name: Test executing the action | |
uses: ./ | |
env: | |
GIT_DEPLOY_KEY: not-a-real-key | |
AUTH_TOKEN_STRING: | | |
email = [email protected] | |
with: | |
email: ${{ env.EMAIL_INPUT }} | |
username: ${{ env.USERNAME_INPUT }} | |
- run: | | |
set -u | |
cat "$RUNNER_TEMP/setup-npm-publish-action/id_rsa" | |
echo | |
git config user.name | |
git config user.email | |
git remote get-url origin | |
git config core.sshCommand | |
grep '^github\.com' "$RUNNER_TEMP/setup-npm-publish-action/known_hosts" | |
[[ "$(cat "$RUNNER_TEMP/setup-npm-publish-action/id_rsa")" == "not-a-real-key" ]] | |
[[ "$(git config user.name)" == "${{ env.USERNAME_INPUT }}" ]] | |
[[ "$(git config user.email)" == "${{ env.EMAIL_INPUT }}" ]] | |
[[ "$(git remote get-url origin)" == "[email protected]:$GITHUB_REPOSITORY.git" ]] | |
# Just check that it is altered from default | |
[[ "$(git config core.sshCommand)" == *UserKnownHostsFile* ]] | |
test-all: | |
needs: | |
- test | |
- test-cleanup-non-repo | |
- test-missing-npmrc | |
runs-on: ubuntu-22.04 | |
steps: | |
- run: | | |
echo "Ok" | |
shell: bash | |
release: | |
runs-on: ubuntu-22.04 | |
name: "Build and release action" | |
needs: [build, test-all] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
persist-credentials: true | |
- name: Configure git | |
uses: smartlyio/github-actions@git-init-userinfo-v1 | |
- name: Release flow | |
uses: smartlyio/github-actions@release-action-node-v1 | |
with: | |
dry_run: true | |
token: "${{ secrets.GITHUB_TOKEN }}" |