Skip to content

Commit

Permalink
Merge pull request #16 from tiagosiebler/actions
Browse files Browse the repository at this point in the history
feat(): add simple actions
  • Loading branch information
tiagosiebler authored Sep 13, 2024
2 parents 582dc62 + aed50e6 commit 92e1573
Show file tree
Hide file tree
Showing 4 changed files with 124 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

github: [tiagosiebler, JJ-Cro] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
16 changes: 16 additions & 0 deletions .github/workflow-settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"EXCLUDE_MESSAGES": [
"update package version",
"update packages",
"update wp version",
"trigger workflow",
"update TOC"
],
"PROJECT": "Backlog",
"ISSUE_COLUMN": "To do",
"PR_COLUMN": "In progress",
"PR_BODY_TITLE": "## Changes",
"TOC_FOLDING": "1",
"TOC_MAX_HEADER_LEVEL": "3",
"TOC_TITLE": "Summary"
}
45 changes: 45 additions & 0 deletions .github/workflows/e2etest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: 'Build & Test'

on: [push]

# on:
# # pull_request:
# # branches:
# # - "master"
# push:
# branches:

jobs:
build:
name: 'Build & Test'
runs-on: ubuntu-latest

steps:
- name: 'Checkout source code'
uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org/'
cache: 'npm'

- name: Install
run: npm ci --ignore-scripts

- name: Check Lint
run: npx eslint src

- name: Check Build
run: npm run build

# - name: Test
# run: npm run test
# env:
# API_KEY: ${{ secrets.API_KEY }}
# API_SECRET: ${{ secrets.API_SECRET }}
# PROXY_ENABLED: ${{ secrets.PROXY_ENABLED }}
# PROXY_HOST: ${{ secrets.PROXY_HOST }}
# PROXY_PASS: ${{ secrets.PROXY_PASS }}
# PROXY_PORT: ${{ secrets.PROXY_PORT }}
# PROXY_USER: ${{ secrets.PROXY_USER }}
51 changes: 51 additions & 0 deletions .github/workflows/npmpublish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Publish to NPM

on:
push:
branches:
- master

permissions:
id-token: 'write'
contents: 'read'

jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- name: Package Version Updated
uses: MontyD/[email protected]
id: version-updated
with:
path: package.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: 'Checkout source code'
if: steps.version-updated.outputs.has-updated
uses: actions/checkout@v4

- uses: actions/setup-node@v4
if: steps.version-updated.outputs.has-updated
with:
node-version-file: '.nvmrc'
registry-url: https://registry.npmjs.org/
cache: 'npm'

- name: Install
run: npm ci --ignore-scripts
if: steps.version-updated.outputs.has-updated

- run: npm run clean
if: steps.version-updated.outputs.has-updated

- run: npm run build
if: steps.version-updated.outputs.has-updated

# - run: npm publish --ignore-scripts --provenance
# if: steps.version-updated.outputs.has-updated
# env:
# NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 comments on commit 92e1573

Please sign in to comment.