From 8913bd4d2438423b545a7d8888dd809cf9ba9b81 Mon Sep 17 00:00:00 2001 From: Tim Gymnich Date: Fri, 31 May 2024 00:19:58 +0200 Subject: [PATCH] re-add actions --- .github/dependabot.yml | 18 ++++++++++++++++++ .github/workflows/checkin.yml | 25 +++++++++++++++++++++++++ .github/workflows/publish.yml | 14 ++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/checkin.yml create mode 100644 .github/workflows/publish.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..51f63257 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,18 @@ +# To get started with Dependabot version updates, you'll need to specify which + # package ecosystems to update and where the package manifests are located. + # Please see the documentation for all configuration options: + # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + + version: 2 + updates: + # npm + - package-ecosystem: "npm" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "monthly" + + # Maintain dependencies for GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" \ No newline at end of file diff --git a/.github/workflows/checkin.yml b/.github/workflows/checkin.yml new file mode 100644 index 00000000..c665aefb --- /dev/null +++ b/.github/workflows/checkin.yml @@ -0,0 +1,25 @@ +name: "PR Checks" + on: [pull_request, push] + + jobs: + check_pr: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.1.1 + + - name: "npm ci" + run: npm ci + + - name: "npm run build" + run: npm run build + + - name: "npm run test" + run: npm run test + + - name: "check for uncommitted changes" + # Ensure no changes, but ignore node_modules dir since dev/fresh ci deps installed. + run: | + git diff --exit-code --stat -- . ':!node_modules' \ + || (echo "##[error] found changed files after build. please 'npm run build && npm run format'" \ + "and check in all changes" \ + && exit 1) \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..9d3baeb4 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,14 @@ +name: "Publish GitHub Action" + on: + push: + branches: + - master + + jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.1.1 + - uses: tgymnich/publish-github-action@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file