diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..857807b --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,18 @@ +name: Build + +on: + push: + pull_request: + +jobs: + build: + uses: AwesomeHamster/workflows/.github/workflows/build.yml@master + permissions: + pull-requests: write + issues: write + with: + lint: true + test: true + yarn-no-immutable: true + approve: true + secrets: inherit diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9d047cd..31b9037 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,10 +6,14 @@ on: jobs: publish: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: AwesomeHamster/actions-publish@master - with: - token: ${{ secrets.NPM_TOKEN }} - test: yarn test + uses: AwesomeHamster/workflows/.github/workflows/publish.yml@master + permissions: + contents: write + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + with: + yarn-no-immutable: true + test-before-publish: true + secrets: + npm-token: ${{ secrets.NPM_TOKEN }} + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 5d005df..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Test -on: [push, pull_request] - -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: AwesomeHamster/actions-test@master - with: - test: | - yarn lint - yarn test