diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..561cc81 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,41 @@ +name: build-and-test-prs + +'on': + pull_request: + types: + - opened + - synchronize + +permissions: + contents: read + +jobs: + made-with-tpgha: + runs-on: ubuntu-latest + steps: + - name: Checkout the repo + uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} + + - name: Setting up NodeJs + id: setup-node-js + uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + + - name: npm ci + run: npm ci --ignore-scripts + shell: bash + + - name: npm run lint + run: npm run lint + shell: bash + + - name: npm run test + run: npm run test + shell: bash + + - name: npm run build + run: npm run build + shell: bash diff --git a/.github/workflows/pushes.yaml b/.github/workflows/release.yaml similarity index 86% rename from .github/workflows/pushes.yaml rename to .github/workflows/release.yaml index 011ebe8..21a98ba 100644 --- a/.github/workflows/pushes.yaml +++ b/.github/workflows/release.yaml @@ -1,13 +1,9 @@ name: build-and-release -"on": +'on': push: branches: - master - pull_request: - types: - - opened - - synchronize permissions: contents: write @@ -23,13 +19,13 @@ jobs: uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} - + - name: Setting up NodeJs id: setup-node-js uses: actions/setup-node@v4 with: node-version-file: .nvmrc - + - name: npm ci run: npm ci shell: bash @@ -37,7 +33,7 @@ jobs: - name: npm run lint run: npm run lint shell: bash - + - name: npm run test run: npm run test shell: bash @@ -51,4 +47,4 @@ jobs: shell: bash env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}