Skip to content

Commit

Permalink
add git folder
Browse files Browse the repository at this point in the history
  • Loading branch information
sammbetts committed Oct 23, 2023
1 parent ba872a4 commit d07a4ff
Show file tree
Hide file tree
Showing 7 changed files with 167 additions and 0 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('@backstage/cli/config/eslint-factory')(__dirname);
8 changes: 8 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<!-- Please describe what these changes achieve -->

#### :heavy_check_mark: Checklist

- [ ] I have added tests for new functionality
- [ ] I have ran yarn tsc and yarn build with no errors
- [ ] I have added screenshots of before and after (for UI changes)
- [ ] I have added or updated documentation (if applicable)
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: CI

on:
pull_request:
branches: ["main"]
types: [opened, reopened]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: yarn install
- run: yarn tsc
- run: yarn build:all
- run: yarn test:all
46 changes: 46 additions & 0 deletions .github/workflows/gh-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Release
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 18
- run: yarn install
- run: yarn tsc
- run: yarn build:all
create-github-release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Create Release
run: gh release create ${{ github.ref }} --generate-notes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish:
needs: create-github-release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 18
registry-url: https://npm.pkg.github.com/
scope: "@sammbetts"
- run: yarn install
- run: git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com" && git config --global user.name "$GITHUB_ACTOR"
- run: yarn version --minor
- run: git push --tags && git push
- run: yarn publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 18
- run: yarn install
- run: yarn tsc
- run: yarn build:all
publish:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 18
registry-url: https://npm.pkg.github.com/
scope: '@sammbetts'
- run: yarn install
- run: git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com" && git config --global user.name "$GITHUB_ACTOR"
- run: yarn version --minor
- run: git push --tags && git push
- run: yarn publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
51 changes: 51 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Pull Request

on:
pull_request:
paths-ignore:
- README.md

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: yarn
node-version-file: .tool-versions
- run: yarn install --immutable
- run: yarn lint:all

prettier:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Configure / Setup with Yarn
uses: actions/setup-node@v3
with:
cache: yarn
node-version-file: .tool-versions
- run: yarn install --immutable
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v37
with:
files: |
**/*.md
**/*.yml
**/*.yaml
**/*.ts
**/*.js
**/*.html
- name: Prettify code
uses: creyD/prettier_action@v4.3
with:
prettier_options: >-
--check ${{ steps.changed-files.outputs.all_changed_files }}
dry: true
only_changed: false
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules
dist
dist-types
.env
.npmrc
.npmignore
.prettierignore

0 comments on commit d07a4ff

Please sign in to comment.