Skip to content

Commit

Permalink
fix: 💚 release build for versioning (#7)
Browse files Browse the repository at this point in the history
* fix: 💚 release build for versioning

Signed-off-by: Newton <5769156+iamnewton@users.noreply.github.com>

* fix: 💚  linting errors with build

Signed-off-by: Newton <5769156+iamnewton@users.noreply.github.com>

* fix: 💚 configuration for yamllint

Signed-off-by: Newton <5769156+iamnewton@users.noreply.github.com>

* fix: 🚨 yamllint

Signed-off-by: Newton <5769156+iamnewton@users.noreply.github.com>

* fix: 🚨 configuration for yamllint

Signed-off-by: Newton <5769156+iamnewton@users.noreply.github.com>

* fix: 🚨 one more attempt

Signed-off-by: Newton <5769156+iamnewton@users.noreply.github.com>

* fix: 🚨 yamllint and superlint are weird

Signed-off-by: Newton <5769156+iamnewton@users.noreply.github.com>

* fix: 🚨 fenagling comments linting

Signed-off-by: Newton <5769156+iamnewton@users.noreply.github.com>

---------

Signed-off-by: Newton <5769156+iamnewton@users.noreply.github.com>
  • Loading branch information
iamnewton authored Oct 25, 2024
1 parent 363e26e commit 0cf3126
Show file tree
Hide file tree
Showing 13 changed files with 91 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ name: Audit
# - [ ] dead css checks
# - [ ] coverage drops

on:
on: # yamllint disable-line rule:truthy
pull_request:
types:
- synchronize
- opened

jobs:
bundle-size:
name: "Audit the bundle size"
name: Audit the bundle size
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bookkeeping-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: Issues Bookkeeping
# - [ ] cleans up language
# - [ ] checks that template is filled out

on:
on: # yamllint disable-line rule:truthy
issues:
types:
- opened
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bookkeeping-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: PR Bookkeeping
# - [ ] cleans up language
# - [ ] checks that template is filled out

on:
on: # yamllint disable-line rule:truthy
pull_request:
types:
- opened
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Deploy

on:
on: # yamllint disable-line rule:truthy
push:
branches:
- main
Expand All @@ -26,4 +26,3 @@ jobs:
environment:
name: github-pages
url: ${{ steps.deploy-github-pages.outputs.page_url }}

2 changes: 1 addition & 1 deletion .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Greetings

on:
on: # yamllint disable-line rule:truthy
- pull_request
- issues

Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Lint

on:
on: # yamllint disable-line rule:truthy
- push
- pull_request

Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
FIX_TSX: true
FIX_TYPESCRIPT_PRETTIER: true
# FIX_YAML_PRETTIER: true => turning this off til i figure out why its not respecting config
# GITHUB_ACTIONS_CONFIG_FILE: "actionlint.yml"
# GITHUB_ACTIONS_CONFIG_FILE: "actionlint.yml" => basically unneeded
# GITLEAKS_CONFIG: ".gitleaks.toml" # Path to your Gitleaks config if you have one
JAVASCRIPT_ES_CONFIG_FILE: "eslint.config.js"
# MARKDOWN_CONFIG_FILE: ".markdown-lint.yml"
Expand All @@ -78,6 +78,7 @@ jobs:
VALIDATE_TYPESCRIPT_PRETTIER: true
VALIDATE_YAML: true # turning on for now while prettier is broken
# VALIDATE_YAML_PRETTIER: true => turning it off because its writing 4 spaces instead of 2
YAML_CONFIG_FILE: "yamllint.config.yml"

- uses: stefanzweifel/git-auto-commit-action@v5
name: Commit and push linting fixes
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Publish

on:
on: # yamllint disable-line rule:truthy
release:
types:
- created
Expand All @@ -25,7 +25,6 @@ jobs:

- run: npm ci
name: Install dependencies
- run: npm ci

- run: npm publish
name: Publish to GitHub Packages
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Release

on:
on: # yamllint disable-line rule:truthy
push:
branches:
- main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/review.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Review

on:
on: # yamllint disable-line rule:truthy
- push
- pull_request

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Stale

on:
on: # yamllint disable-line rule:truthy
schedule:
- cron: "30 1 * * *"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Test

on:
on: # yamllint disable-line rule:truthy
- push

jobs:
Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Version

# @TODO: check if this could replace changesets
# if so, i can get rid of the publish command and changesets

on: # yamllint disable-line rule:truthy
push:
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
release:
name: Version using Semantic Versioning
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
release-type: node
# The short ref name of the branch or tag that triggered
# the workflow run. For example, `main` or `1.x`
target-branch: ${{ github.ref_name }}

# The logic below handles the npm publication:
# - uses: actions/checkout@v4
# name: Checkout repository
# # these if statements ensure that a publication only occurs when
# # a new release is created:
# if: ${{ steps.release.outputs.release_created }}

# - uses: actions/setup-node@v4
# name: Setup Node.js @v20
# if: ${{ steps.release.outputs.release_created }}
# with:
# cache: npm
# node-version: 20.x
# registry-url: 'https://registry.npmjs.org'

# - run: npm ci
# name: Install dependencies
# if: ${{ steps.release.outputs.release_created }}

# - run: npm publish
# name: Publish to NPM
# env:
# NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
# if: ${{ steps.release.outputs.release_created }}

# - run: npm publish
# name: Publish to GitHub Packages
# env:
# NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
# if: ${{ steps.release.outputs.release_created }}
20 changes: 20 additions & 0 deletions yamllint.config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---

extends: default

rules:
comments:
min-spaces-from-content: 1
require-starting-space: true

comments-indentation: {}

document-start:
ignore: |
.github/*.yml
indentation:
spaces: consistent
indent-sequences: consistent

line-length: disable

0 comments on commit 0cf3126

Please sign in to comment.