Skip to content

Commit

Permalink
ci: Migrate from Travis CI to GitHub Actions
Browse files Browse the repository at this point in the history
Co-Authored-By: Felix Mann <[email protected]>

Closes #140
  • Loading branch information
pmowrer committed Jan 17, 2024
1 parent 2b9dae9 commit d63fafd
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 11 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/release-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Release preview
on: [pull_request]
jobs:
release-preview:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
# semantic-release dry-run workaround https://github.com/semantic-release/semantic-release/issues/1890#issuecomment-974512960
- run: git checkout -b ${{ github.head_ref }}
- run: unset GITHUB_ACTIONS && npx semantic-release-github-pr --debug
19 changes: 19 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Release

on:
push:
branches:
- master

jobs:
release:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- run: npx semantic-release --debug
13 changes: 13 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Tests
on: [pull_request]
jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- name: Git credentials need to be set when testing git utils
run: git config --global user.email [email protected] && git config --global user.name "Test user"
- run: yarn && yarn test
11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

0 comments on commit d63fafd

Please sign in to comment.