Skip to content

Commit

Permalink
feat: add release-it test config
Browse files Browse the repository at this point in the history
  • Loading branch information
janstuemmel committed Nov 17, 2022
1 parent cb96556 commit b3cf114
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 15 deletions.
47 changes: 32 additions & 15 deletions .github/workflows/deploy-to-store.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,41 @@ name: Deploy to stores
on:
pull_request: # TODO: remove
workflow_dispatch:
inputs:
increment:
type: choice
required: true
description: Version
default: minor
options:
- patch
- minor
- major

jobs:
build:
name: Build artifacts
name: Build and release ${{ inputs.increment || 'patch' }}
environment: firefox-addon
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: 'feat/enhance-build' # TODO remove
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- run: npm ci
- run: npm run bundle
- uses: actions/upload-artifact@v3
with:
name: dist
path: dist/*.zip
- run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- run: npx release-it ${{ inputs.increment || 'patch' }} --ci
- run: cat package.json
# - run: npm run bundle
# - uses: actions/upload-artifact@v3
# with:
# name: dist
# path: dist/*.zip

# deploy_firefox:
# name: Deploy firefox addon
Expand All @@ -34,15 +51,15 @@ jobs:
# artifact: dist/firefox.zip
# keys: ${{ secrets.KEYS }}

deploy_chrome:
name: Deploy chrome extension
needs: [build]
environment: chrome-extension
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
- run: ls
- run: ls dist
# deploy_chrome:
# name: Deploy chrome extension
# needs: [build]
# environment: chrome-extension
# runs-on: ubuntu-latest
# steps:
# - uses: actions/download-artifact@v3
# - run: ls
# - run: ls dist
# - name: Publish
# uses: PlasmoHQ/bpp@v3
# with:
Expand Down
8 changes: 8 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"git": {
"commitMessage": "release: v${version}\n\n[ci skip]"
},
"github": {
"release": true
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "aws-role-switch",
"private": "true",
"version": "0.4.0",
"license": "MIT",
"scripts": {
Expand Down

0 comments on commit b3cf114

Please sign in to comment.