Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added .github/snippet-bot.yml
Empty file.
14 changes: 9 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
name: Lint
on: [push, pull_request]
on: [push, pull_request, workflow_dispatch]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
echo "No lint checks";
exit 1;
- uses: actions/setup-node@v1
with:
node-version: 16
- name: Install dependencies
run: npm ci
- name: Lint files
run: npm run lint
32 changes: 32 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
on:
push:
branches:
- main
name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
with:
token: ${{secrets.GOOGLEWORKSPACE_BOT_TOKEN}}
release-type: node
package-name: release-please-action
- uses: actions/checkout@v2
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v1
if: ${{ steps.release.outputs.release_created }}
with:
node-version: 16
- name: Write test credentials
if: ${{ steps.release.outputs.release_created }}
run: |
echo "${CLASP_CREDENTIALS}" > "${HOME}/.clasprc.json"
env:
CLASP_CREDENTIALS: ${{secrets.LIBRARIES_OWNER_CLASP_TOKEN}}
- name: Depoy scripts
if: ${{ steps.release.outputs.release_created }}
run: |
cd src
npx @google/clasp push
MESSAGE=$(git log -1 --pretty=%B) npx @google/clasp version ${MESSAGE}
14 changes: 9 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
name: Test
on: [push, pull_request]
on: [push, pull_request, workflow_dispatch]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
echo "No tests";
exit 1;
- uses: actions/setup-node@v1
with:
node-version: 16
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm run test
26 changes: 26 additions & 0 deletions .github/workflows/update-dist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
on: [pull_request]
name: Update dist folder
jobs:
update-dist-src:
if: "${{ contains(github.event.pull_request.labels.*.name, 'autorelease: pending') }}"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ secrets.GOOGLEWORKSPACE_BOT_TOKEN }}
- uses: actions/setup-node@v1
with:
node-version: 16
- name: Install dependencies
run: npm ci
- name: Update dist and doc folders
run: |
npm run dist
npm run docs
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "chore: Update dist/ and docs/ directories"
commit_user_name: Google Workspace Bot
commit_user_email: googleworkspace-bot@google.com
commit_author: Google Workspace Bot <googleworkspace-bot@google.com>
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@
"urlsafe-base64": "1.0.0"
},
"scripts": {
"preversion": "npm test && cd src/ && clasp push",
"version": "npm run dist && npm run doc && git add -A dist docs",
"postversion": "MESSAGE=$(git log -1 --pretty=%B) && cd src/ && clasp version $MESSAGE",
"dist": "gulp dist",
"lint": "gulp lint",
"doc": "jsdoc -c jsdoc.json src/*.js README.md",
Expand Down