Skip to content
New issue

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

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

Already on GitHub? # to your account

Automate release process, and other improvements #156

Merged
merged 3 commits into from
Feb 17, 2025
Merged
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
12 changes: 10 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Build"
name: Build

on:
push:
Expand All @@ -14,7 +14,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build
run: |
yarn install
npm install
npm run build

- name: Archive distribution bundle
uses: actions/upload-artifact@v4
with:
path: dist/config-template-card.js
name: config-template-card-latest-build.js
overwrite: true
15 changes: 8 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
name: Release

on:
release:
types: [published]
push:
tags:
- '*'

jobs:
release:
name: Prepare release
name: Prepare Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build
run: |
cd /home/runner/work/config-template-card/config-template-card
yarn install
npm install
npm run build

- name: Upload as release
- name: Upload as Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: /home/runner/work/config-template-card/config-template-card/dist/config-template-card.js
file: dist/config-template-card.js
asset_name: config-template-card.js
tag: ${{ github.ref }}
prerelease: ${{ contains(github.ref_name, 'beta') || contains(github.ref_name, 'rc') }}
overwrite: true
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/node_modules/
/.rpt2_cache/
package-lock.json
/dist
/yarn.lock
/.version.json
/.tsbuildinfo
/dist/
2 changes: 1 addition & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ module.exports = {
singleQuote: true,
printWidth: 120,
tabWidth: 2,
};
};
10 changes: 9 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,21 @@ import globals from 'globals';

export default ts.config(
js.configs.recommended,
ts.configs.recommended,
ts.configs.strictTypeChecked,
ts.configs.stylisticTypeChecked,
{
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': ['warn', {'argsIgnorePattern': '^_'}],
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
},
languageOptions: {
sourceType: 'module', // Allows for the use of imports
globals: {
...globals.browser,
},
parserOptions: {
tsconfigRootDir: import.meta.dirname,
projectService: true, // TypeScript type checking service
Expand Down
Loading