Skip to content

Commit

Permalink
Merge pull request #55 from EdgePi-Cloud/dev
Browse files Browse the repository at this point in the history
merge dev to main
  • Loading branch information
jimmy121192 authored Jan 25, 2024
2 parents aa716a6 + df9c193 commit 0c47d43
Show file tree
Hide file tree
Showing 15 changed files with 7,116 additions and 1,711 deletions.
27 changes: 13 additions & 14 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": "standard-with-typescript",
"overrides": [
],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"project": ["./tsconfig.json"]
},
"rules": {
}
"env": {
"browser": true,
"es2021": true
},
"extends": "standard-with-typescript",
"overrides": [],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"project": ["./tsconfig.json"]
},
"ignorePatterns": ["**/__mocks__/*.ts"],
"rules": {}
}
27 changes: 27 additions & 0 deletions .github/workflows/create-release-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Create Release Tag
on:
push:
branches:
- main

jobs:
build-and-publish:
name: Create Release Tag
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.ACTIONS_BOT_TOKEN }}
- name: Get Current Version
run: echo "current_version=$(cat package.json | jq -r '.version')" >> $GITHUB_ENV
- name: Create Release Tag
env:
commit_name: bot-edgepi
commit_email: bot@edgepi.com
username: bot-edgepi
run: |
git config user.name ${{ env.commit_name }}
git config user.email ${{ env.commit_email }}
git tag -a release/v${{ env.current_version }} -m "tag release version ${{ env.current_version }}"
git push origin release/v${{ env.current_version }}
2 changes: 1 addition & 1 deletion .github/workflows/es-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ jobs:

- name: Lint
if: (success() || failure()) && steps.install-dependencies.outcome == 'success'
run: npm run lint
run: npm run lint
25 changes: 17 additions & 8 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,26 @@ on:
push:
branches:
- main
tags:
- release/*
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm publish --access public
node-version: "16.x"
registry-url: "https://registry.npmjs.org"

- name: Release Package
uses: ncipollo/release-action@v1.12.0

- name: Publish Package to npm
run: |
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 1 addition & 2 deletions .github/workflows/versioning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 14 # Adjust this to your desired Node.js version
node-version: 16 # Adjust this to your desired Node.js version

- name: Set Git user information
run: |
Expand Down Expand Up @@ -59,7 +59,6 @@ jobs:
version=$(cat package.json | jq -r '.version')
git add .
git commit -m "Bump version to $version"
git push --follow-tags
git push --force origin "$branch_name":dev
- name: Delete versioned branch
Expand Down
4 changes: 2 additions & 2 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.github/
# node modules
node_modules

# eslint
.eslintrc.json
.eslintrc.json
2 changes: 1 addition & 1 deletion branch-name.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version-20240115225907-1e1832bd
version-20240125210411-0233c6f9
Loading

0 comments on commit 0c47d43

Please sign in to comment.