From 6aa300b6c2213e431264fe7afe11a5345bd95919 Mon Sep 17 00:00:00 2001 From: Joel Arvidsson Date: Thu, 26 Oct 2023 18:39:32 +0200 Subject: [PATCH] Configure Github actions for tests and deployment --- .github/FUNDING.yml | 1 - .github/workflows/deploy.yml | 26 ++++++++++++++++++++++++++ .github/workflows/tests.yml | 23 +++++++++++++++++++++++ .travis.yml | 20 -------------------- 4 files changed, 49 insertions(+), 21 deletions(-) delete mode 100644 .github/FUNDING.yml create mode 100644 .github/workflows/deploy.yml create mode 100644 .github/workflows/tests.yml delete mode 100644 .travis.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 0ef59cd..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1 +0,0 @@ -github: [oblador] diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..c234487 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,26 @@ +name: Deploy + +on: + push: + branches: + - master + +jobs: + publish: + name: Release new version + if: github.repository_owner == 'oblador' + runs-on: ubuntu-latest + environment: Deploy + permissions: + id-token: write + steps: + - uses: actions/checkout@v4 + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: '20' + - name: Publish + uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_PUBLISH_TOKEN }} + provenance: true diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..3fa14c4 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,23 @@ +name: Tests + +on: + - push + - pull_request + +jobs: + tests: + name: Tests + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: '20' + - name: Install dependencies + run: yarn --frozen-lockfile --non-interactive --silent --ignore-scripts + - name: Static analysis + run: yarn lint + - name: Run tests + run: yarn jest diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c683c02..0000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -language: node_js -node_js: -- stable -cache: - yarn: true - directories: - - node_modules -install: -- yarn -script: -- yarn test -deploy: - provider: npm - email: joel@oblador.se - api_key: - secure: "HDRoMPEc30cezQkg/CdWpXlQTzF4bXW5J2Cftc8CwywMt+9CH/eQWZJcK7U80j7NSrh2Yus3xVD2d4vA8MCpZySjE8bosx7GxfArAj8CEVTAUSSy4tCn5woTJmC3FU/Iexq/MQTcjwhRhCGGwyfKYJlqZGeXkao0G7Hn5n8fAflcTXfibDUsI4pSu6hj70Cgo9RrWJ3ktTZ7eOKX8Iu4PxWJRkrpTVRswwlJTrO5UTh/eyD2GB6/qVGbOOm/ZiAta7L2e/27gbowgLW0Ic3/pypQ62Q+EPjCVlfqLSxS2o6lUutqy+sl0xHacNHR7ShfcZdeUDAZ2r5OqOc+iJsccc+tEgVxH6CVTAU3l+57ynKuOyDIOn0ySHMh0Pcj1FzRwAvOfkXmvEvBxrqNNR8KZWfUi2e9J8X1EYmM5rZlolxRHwyz8I6k098/JpaJERxnkXZ3uTVlwQnOc3ANGTzrdN/yQzLocY+6DuSshSUCAAno9zg9KStDkmTz+H7jw2TB+Opjskv65sd9k10xqoCWEltLNpvvTI8M9xnQjgb1X+T8NqIaui7cE/dpFBlRoueota5CouhedUhKbcgCxHutFt5NEdwBDhDAHn5mH/KBLmRvZA2/iV11kGjh5ZdhDKMEAfwiT4fi5Xns9guESzWxbU/edX+rb0FGlTQFXoLzod0=" - on: - tags: true - repo: oblador/react-native-animatable - condition: "$TRAVIS_TAG =~ ^v[0-9]+\\.[0-9]+\\.[0-9]+.*$"