Skip to content

Commit 6b95391

Browse files
authored
Ci cd (#5)
1 parent 5ba37d8 commit 6b95391

18 files changed

+504
-1380
lines changed

.eslintrc-auto-import.json

-64
This file was deleted.

.eslintrc.js

-49
This file was deleted.

.github/workflows/bump-version.yml

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# This is a basic workflow that is manually triggered
2+
3+
name: ⬆️ Bump version
4+
5+
# Controls when the action will run. Workflow runs when manually triggered using the UI
6+
# or API.
7+
on:
8+
workflow_dispatch:
9+
# Inputs the workflow accepts.
10+
inputs:
11+
version:
12+
# Friendly description to be shown in the UI instead of 'name'
13+
description: 'Semver type of new version (major / minor / patch)'
14+
15+
required: true
16+
type: choice
17+
options:
18+
- patch
19+
- minor
20+
- major
21+
22+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
23+
jobs:
24+
# This workflow contains a single job called "bump-version"
25+
bump-version:
26+
# The type of runner that the job will run on
27+
runs-on: ubuntu-latest
28+
29+
# Steps represent a sequence of tasks that will be executed as part of the job
30+
steps:
31+
# Check out the content (source branch). Use a deploy key so that
32+
# when we push changes, it will trigger the release workflow
33+
# run that runs on: tag. (Using the GitHub token would
34+
# not run the workflow to prevent infinite recursion.)
35+
36+
- name: Check out source
37+
uses: actions/checkout@v4
38+
with:
39+
ssh-key: ${{ secrets.DEPLOY_KEY }}
40+
- name: setup pnpm
41+
uses: pnpm/action-setup@v2
42+
with:
43+
version: 8.7.1
44+
- name: Setup Node.js
45+
uses: actions/setup-node@v3
46+
with:
47+
node-version: 18
48+
cache: 'pnpm'
49+
50+
- name: Install packages
51+
run: pnpm i
52+
53+
- name: Setup Git
54+
run: |
55+
git config user.name 'f3ve'
56+
git config user.email '${{ secrets.MY_EMAIL }}'
57+
58+
- name: bump version
59+
run: npm version ${{ github.event.inputs.version }}
60+
61+
- name: Push latest version
62+
run: git push origin main --follow-tags

.github/workflows/release.yml

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
on:
2+
push:
3+
tags:
4+
- 'v*'
5+
6+
name: 🚀 Release
7+
8+
jobs:
9+
publish-to-npm:
10+
name: Publish to npm
11+
runs-on: ubuntu-latest
12+
permissions:
13+
id-token: write
14+
steps:
15+
- name: Checkout source
16+
uses: actions/checkout@v4
17+
with:
18+
ref: main
19+
20+
- name: Setup pnpm
21+
uses: pnpm/action-setup@v2
22+
with:
23+
version: 8.7.1
24+
25+
- name: setup node
26+
uses: actions/setup-node@v3
27+
with:
28+
node-version: 18
29+
registry-url: 'https://registry.npmjs.org'
30+
cache: pnpm
31+
32+
- name: Install dependencies
33+
run: pnpm i
34+
35+
- name: Set publishing config
36+
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}"
37+
env:
38+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
39+
40+
- name: Compile code
41+
run: pnpm run build
42+
43+
- name: Publish
44+
run: pnpm publish --access=public --no-git-checks
45+
46+
create-github-release:
47+
name: Create GitHub Release
48+
runs-on: ubuntu-latest
49+
needs: publish-to-npm
50+
permissions:
51+
contents: write
52+
steps:
53+
- name: Checkout code
54+
uses: actions/checkout@v3
55+
56+
- name: Create Release
57+
run: gh release create ${{ github.ref }} --generate-notes
58+
env:
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.prettierrc

-10
This file was deleted.

.vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"eslint.experimental.useFlatConfig": true
3+
}

CHANGELOG.md

-19
This file was deleted.

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 Freedom Evenden
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

auto-imports.d.ts

-65
This file was deleted.

eslint.config.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import f3veEslintConfig from '@f3ve/eslint-config';
2+
3+
export default f3veEslintConfig({
4+
prettier: true,
5+
typescript: true,
6+
browser: true,
7+
node: true,
8+
vue: true,
9+
});

0 commit comments

Comments
 (0)