diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..e6fe32b --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,19 @@ +name: Publish + +on: + release: + types: [published, edited] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + cache: "npm" + - run: npm install && npm run build + - uses: JasonEtco/build-and-tag-action@v1 + env: + GITHUB_TOKEN: ${{ github.token }} diff --git a/action.yml b/action.yml index b0d0c3c..c1af4c9 100644 --- a/action.yml +++ b/action.yml @@ -16,7 +16,7 @@ inputs: default: ${{ github.token }} runs: using: "node16" - main: "index.js" + main: "dist/index.js" branding: icon: "shuffle" color: "green" diff --git a/package.json b/package.json index c14149b..501b2a6 100644 --- a/package.json +++ b/package.json @@ -2,9 +2,10 @@ "name": "install-nextflow-action", "version": "1.0.0", "description": "", - "main": "index.js", + "main": "dist/index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Error: no test specified\" && exit 1", + "build": "ncc build index.js --license LICENSE" }, "keywords": [], "author": "",