Skip to content

Commit

Permalink
setup github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
levibostian committed Nov 21, 2023
1 parent 2eedbfb commit c4dc2fa
Show file tree
Hide file tree
Showing 5 changed files with 7,635 additions and 71 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/deploy-plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Deploy plugin

on:
push:
branches: [main, beta, alpha]

jobs:
deploy-git-tag-and-push-npm:
runs-on: ubuntu-latest
permissions:
contents: write # to create git tag
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- run: npm ci

- name: Deploy git tag via semantic-release
uses: cycjimmy/semantic-release-action@v4
with:
semantic_version: latest # since our plugin has a devDependency on semantic-release, using latest keyword here will upgrade node_modules/ copy to the latest version for deployment
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_PUSH_TOKEN }}
41 changes: 41 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Run tests

on: [pull_request]

jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- run: npm ci
- run: npm run test

run-plugin-in-semantic-release:
runs-on: ubuntu-latest
permissions:
contents: write # to set permissions for semantic-release dry-run to pass
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- run: npm ci

- name: install self to run it in semantic-release
run: |
npm pack
npm install --no-save semantic-release-cocoapods-0.0.0.tgz
- name: setup git user to run semantic-release
run: |
git config --global user.email "user@example.com"
git config --global user.name "Example User"
- name: Run semantic-release in dry run
run: unset GITHUB_ACTIONS && npx semantic-release --dry-run --no-ci --branches ${REF_NAME} --plugins "semantic-release-cocoapods"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REF_NAME: ${{ github.ref_name }}
139 changes: 69 additions & 70 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,55 +1,14 @@

# Created by https://www.gitignore.io/api/macos,windows,linux,node

### Linux ###
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### macOS ###
*.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
Expand All @@ -62,11 +21,12 @@ lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
Expand All @@ -75,22 +35,34 @@ bower_components
# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/
# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

Expand All @@ -100,32 +72,59 @@ typings/
# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

### Windows ###
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db
# Docusaurus cache and generated files
.docusaurus

# Folder config file
Desktop.ini
# Serverless directories
.serverless/

# Recycle Bin used on file shares
$RECYCLE.BIN/
# FuseBox cache
.fusebox/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp
# DynamoDB Local files
.dynamodb/

# Windows shortcuts
*.lnk
# TernJS port file
.tern-port

# End of https://www.gitignore.io/api/macos,windows,linux,node
# Stores VSCode versions used for testing VSCode extensions
.vscode-test

package-lock.json
yarn.lock
# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
Loading

0 comments on commit c4dc2fa

Please sign in to comment.