diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 56014ab2..ea9703a5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,12 +18,12 @@ jobs: - name: Setup node and cache dependencies uses: actions/setup-node@v2 with: - node-version: '16' + node-version: 16 cache: 'npm' - name: Build and test run: | - npm install + npm ci npm run all - name: Run action diff --git a/README.md b/README.md index a5fd2278..54c3edf3 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ A Github Action to download assets from github release. It can download specifie with: # The source repository path. # Expected format {owner}/{repo} + # Default: ${{ github.repository }} repository: "" # A flag to set the download target as latest release @@ -52,7 +53,6 @@ A Github Action to download assets from github release. It can download specifie - uses: robinraju/release-downloader@v1.3 with: - repository: ${{ github.reposiotry }} latest: true fileName: "foo.zip" ``` diff --git a/action.yml b/action.yml index de58b99e..af46a18d 100644 --- a/action.yml +++ b/action.yml @@ -4,8 +4,8 @@ author: "Robin Raju" inputs: repository: description: "The source repository path. Expected format {owner}/{repo}" - default: "" - required: true + default: ${{ github.repository }} + required: false latest: description: "A flag to choose between latest release and remaining releases" default: "false" diff --git a/package.json b/package.json index e29b1dc0..9aa7f88a 100644 --- a/package.json +++ b/package.json @@ -5,14 +5,12 @@ "description": "Github action to download release assets", "main": "lib/main.js", "scripts": { - "build": "tsc", + "build": "tsc && ncc build", "format": "prettier --write **/*.ts", "format-check": "prettier --check **/*.ts", "lint": "eslint src/**/*.ts", - "pack": "ncc build", "test": "jest", - "dev": "npm run build && npm run pack && node dist/index.js", - "all": "npm run format && npm run lint && npm run build && npm run pack && npm test" + "all": "npm run format && npm run lint && npm run build && npm test" }, "repository": { "type": "git",