forked from actions/toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow changing default cache file size limit
Fixes actions#1932 Signed-off-by: Voplica <[email protected]>
- Loading branch information
1 parent
1f7c2c7
commit 1f1a186
Showing
4 changed files
with
102 additions
and
49 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 |
---|---|---|
|
@@ -8,11 +8,19 @@ on: | |
package: | ||
required: true | ||
description: 'core, artifact, cache, exec, github, glob, http-client, io, tool-cache, attest' | ||
test: | ||
default: true | ||
type: boolean | ||
description: 'If tests step is enabled' | ||
|
||
jobs: | ||
test: | ||
runs-on: macos-latest-large | ||
|
||
publish: | ||
runs-on: ubuntu-latest | ||
environment: npm-publish | ||
permissions: | ||
contents: write | ||
id-token: write | ||
packages: write | ||
steps: | ||
- name: setup repo | ||
uses: actions/checkout@v4 | ||
|
@@ -24,62 +32,51 @@ jobs: | |
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
registry-url: https://npm.pkg.github.com/ | ||
|
||
- name: Create versions | ||
id: versions | ||
uses: voplica/[email protected] | ||
with: | ||
gitHubToken: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
- name: setup authentication | ||
run: echo "//npm.pkg.github.com/:_authToken=${NPM_TOKEN}" >> .npmrc | ||
env: | ||
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: npm install | ||
run: npm install | ||
|
||
- name: TS-Node - Update Package Version | ||
run: npm version v${{ steps.versions.outputs.ver_semVerNoMeta }} --allow-same-version | ||
working-directory: packages/${{ github.event.inputs.package }} | ||
|
||
- name: bootstrap | ||
run: npm run bootstrap | ||
|
||
- name: build | ||
run: npm run build | ||
|
||
- name: test | ||
run: npm run test | ||
run: | | ||
if [[ "${{ github.event.inputs.test }}" == "true" ]]; then | ||
npm run test | ||
fi | ||
- name: set registry | ||
run: npm config set registry https://npm.pkg.github.com/ | ||
|
||
- name: pack | ||
run: npm pack | ||
working-directory: packages/${{ github.event.inputs.package }} | ||
|
||
- name: upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ github.event.inputs.package }} | ||
path: packages/${{ github.event.inputs.package }}/*.tgz | ||
- name: set registry | ||
run: npm config set registry https://npm.pkg.github.com/ | ||
|
||
publish: | ||
runs-on: macos-latest-large | ||
needs: test | ||
environment: npm-publish | ||
permissions: | ||
contents: read | ||
id-token: write | ||
steps: | ||
|
||
- name: download artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: ${{ github.event.inputs.package }} | ||
|
||
- name: setup authentication | ||
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> .npmrc | ||
env: | ||
NPM_TOKEN: ${{ secrets.TOKEN }} | ||
|
||
- name: publish | ||
- name: Publishing Package | ||
run: npm publish --provenance *.tgz | ||
|
||
- name: notify slack on failure | ||
if: failure() | ||
run: | | ||
curl -X POST -H 'Content-type: application/json' --data '{"text":":pb__failed: Failed to publish a new version of ${{ github.event.inputs.package }}"}' $SLACK_WEBHOOK | ||
env: | ||
SLACK_WEBHOOK: ${{ secrets.SLACK }} | ||
|
||
- name: notify slack on success | ||
if: success() | ||
run: | | ||
curl -X POST -H 'Content-type: application/json' --data '{"text":":dance: Successfully published a new version of ${{ github.event.inputs.package }}"}' $SLACK_WEBHOOK | ||
env: | ||
SLACK_WEBHOOK: ${{ secrets.SLACK }} | ||
|
||
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
NODE_OPTIONS: --max_old_space_size=4096 | ||
working-directory: packages/${{ github.event.inputs.package }} |
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 |
---|---|---|
|
@@ -5,3 +5,4 @@ packages/*/__tests__/_temp/ | |
.DS_Store | ||
*.xar | ||
packages/*/audit.json | ||
.idea |
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