Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NO JIRA]: Migrate to automated CI #377

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Please include a description of the changes you are introducing and some screens

Remember to include the following changes:

- [ ] `UNRELEASED.md` (See [How to write a good changelog entry](https://github.com/Skyscanner/backpack-foundations/blob/main/CHANGELOG_FORMAT.md))
- [ ] `README.md`
- [ ] Tests
- [ ] Storybook examples created/updated for changes to tokens and icons
30 changes: 19 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,31 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set the correct npm version
run: nvm install && nvm use
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies from npm
run: |
nvm use
npm ci
run: npm ci

- name: Build Foundations
run: |
nvm use
npm run build
run: npm run build

- name: Confirm the build hasn't changed any files
run: ./check-pristine-state package-lock.json

- name: Run tests
run: |
nvm use
npm test
run: npm test

ReleaseDraft:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: read
steps:
- name: Draft release notes
uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15 changes: 15 additions & 0 deletions .github/workflows/label-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: label-check

on:
pull_request_target:
types: [opened, labeled, unlabeled, synchronize]

jobs:
label-check:
runs-on: ubuntu-latest

steps:
- uses: docker://agilepathway/pull-request-label-checker:latest
with:
one_of: major,minor,patch,skip-changelog
repo_token: ${{ secrets.GITHUB_TOKEN }}
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: release

on:
release:
types: [published]

defaults:
run:
shell: bash -l {0}

jobs:
release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies from npm
run: npm ci

- name: Build Foundations
run: npm run build

- name: Confirm the build hasn't changed any files
run: ./check-pristine-state package-lock.json

- name: Release Foundations
if: ${{ github.event_name == 'release' }}
run: npm run lerna:publish -- bump $RELEASE_VERSION --yes --skip-git
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
RELEASE_VERSION: ${{ github.event.release.tag_name }}
Loading
Loading