Skip to content

Commit

Permalink
fix(git-workflow): added yml for main and beta
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanGerbeth committed Sep 9, 2024
1 parent a01e5e3 commit 8fda8d9
Show file tree
Hide file tree
Showing 5 changed files with 156 additions and 1 deletion.
75 changes: 75 additions & 0 deletions .github/workflows/beta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Beta

on:
push:
branches:
- beta

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
install:
if: "!contains(github.event.head_commit.message, 'skip ci')"
name: Install
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
node: [20]

steps:
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Checkout Repo
uses: actions/checkout@v4
- name: cache node_modules
uses: actions/cache@v4
id: cache
with:
path: |
node_modules
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }}

- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci

- name: Lint
run: npm run lint

- name: Test
run: npm run test

semantic-version:
name: Semantic Release
needs: install
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
node: [20]

steps:
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Checkout Repo
uses: actions/checkout@v4
- name: cache node_modules
uses: actions/cache@v4
id: cache
with:
path: node_modules
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }}
- name: Versioning
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npx -p @nuxt/module-builder -p semantic-release -p @semantic-release/git -p @semantic-release/changelog -p @semantic-release/exec -p @semantic-release/github semantic-release --provider=github --debug=true
76 changes: 76 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Main

on:
push:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
install:
if: "!contains(github.event.head_commit.message, 'skip ci')"
name: Install
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
node: [20]

steps:
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Checkout Repo
uses: actions/checkout@v4
- name: cache node_modules
uses: actions/cache@v4
id: cache
with:
path: |
node_modules
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }}

- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci

- name: Lint
run: npm run lint

- name: Test
run: npm run test

semantic-version:
name: Semantic Release
needs: install
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
node: [20]

steps:
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Checkout Repo
uses: actions/checkout@v4
- name: cache node_modules
uses: actions/cache@v4
id: cache
with:
path: node_modules
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }}
- name: Versioning
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npx -p @nuxt/module-builder -p semantic-release -p @semantic-release/git -p @semantic-release/changelog -p @semantic-release/exec -p @semantic-release/github semantic-release --provider=github --debug=true
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.0.0",
"description": "collection of rxjs helpers",
"type": "module",
"private": "true",
"scripts": {
"lint": "npm run lint:es",
"lint:es": "eslint --fix .",
Expand Down
4 changes: 3 additions & 1 deletion packages/observables/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
"name": "@rxjs-collection/observables",
"version": "0.0.0",
"description": "rxjs observables",
"type": "module",
"private": "true",
"main": "index.js",
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "MIT"
}
}
1 change: 1 addition & 0 deletions packages/operators/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.0.0",
"description": "rxjs operators",
"type": "module",
"private": "true",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down

0 comments on commit 8fda8d9

Please sign in to comment.