Skip to content

This sets up clasp tokens for pushing and deploying project to Google App Script

License

Notifications You must be signed in to change notification settings

namaggarwal/clasp-token-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clasp Token Action

This action allows you to create .clasprc.json file in the home directory. This is needed to push projects in Google App Script.

Inputs

client-id

Required The ClientID of the project.

client-secret

Required The ClientSecret of the project.

refresh-token

Required RefreshToken of the user.

How to get the value of the inputs

You need to install clasp locally to get the values.

  • Install clasp
npm install -g @google/clasp

clasp.json

{"scriptId":"1R7XTv-sdhsdjhsjhsjhjsfgdhdgfshgdsfhdfhs"}
  • Login to clasp
clasp login
  • Get values from local file
cat ~/.clasprc.json

Example usage

uses: namaggarwal/[email protected]
with:
  client-id: test-client-id
  client-secret: test-client-secret
  refresh-token: test-refresh-token

You can specify the clasp command in your npm scripts. For example

package.json

{
  "name": "my-project",
  "version": "0.0.1",
  "script": {
    "push-to-app": "clasp push"
  }
}

About

This sets up clasp tokens for pushing and deploying project to Google App Script

Resources

License

Stars

Watchers

Forks

Packages

No packages published