Skip to content

Commit

Permalink
update action versions and bundle publish
Browse files Browse the repository at this point in the history
  • Loading branch information
joshparkerj committed May 11, 2023
1 parent 22b9e3c commit 74d9dbc
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 24 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
Expand All @@ -26,7 +26,7 @@ jobs:
- run: npm install
- run: npm test
- name: Codecov
uses: codecov/codecov-action@v2.1.0
uses: codecov/codecov-action@v3
analyze:
needs: build
runs-on: ubuntu-latest
Expand All @@ -40,22 +40,22 @@ jobs:
language: [ 'javascript' ]
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
publish:
needs: analyze
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js 16.x
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'npm'
Expand Down
33 changes: 18 additions & 15 deletions bundle-publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,26 @@ glob(pattern)
console.error(err);
} else {
const content = contentBuffer.toString();
const gistId = content.match(/downloadURL.*joshparkerj\/([^/]*)/)[1];
const description = content.match(/description\s+(.*)/)[1];
const filename = file.includes('meta') ? content.match(/updateURL.*raw\/([^/]*)/)[1] : content.match(/downloadURL.*raw\/([^/]*)/)[1];
const gistIdMatch = content.match(/downloadURL.*joshparkerj\/([^/]*)/);
if (gistIdMatch) {
const gistId = gistIdMatch[1];
const description = content.match(/description\s+(.*)/)[1];
const filename = file.includes('meta') ? content.match(/updateURL.*raw\/([^/]*)/)[1] : content.match(/downloadURL.*raw\/([^/]*)/)[1];

octokit.request(`PATCH /gists/${gistId}`, {
gist_id: gistId,
description,
files: {
[filename]: {
filename,
content,
octokit.request(`PATCH /gists/${gistId}`, {
gist_id: gistId,
description,
files: {
[filename]: {
filename,
content,
},
},
},
})
.then(() => {
upload(i + 1);
});
})
.then(() => {
upload(i + 1);
});
}
}
});
}
Expand Down

0 comments on commit 74d9dbc

Please sign in to comment.