Skip to content

Commit

Permalink
ci(github-actions): add workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
PunGrumpy committed Nov 19, 2023
1 parent 0bf9c2d commit c16f2df
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: 🚚 Continuous Delivery
on:
push:
branches:
- main
workflow_dispatch:
jobs:
release:
permissions:
contents: write
pull-requests: write
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
bun-version: [latest]
name: πŸš€ Release
runs-on: ${{ matrix.os }}
steps:
- name: πŸ’€ Automated Release
uses: google-github-actions/release-please-action@v3
id: automated_release
with:
release-type: 'node'
token: ${{ secrets.GITHUB_TOKEN }}
bump-minor-pre-major: true
prerelease: true
release-as: 1.2.4
- name: πŸ”” Checkout
uses: actions/checkout@v4
- name: 🍞 Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: ${{ matrix.bun-version }}
- name: πŸ”½ Install Dependencies
run: bun install
- name: 🏷️ Tag Stable Version
if: ${{ steps.automated_release.outputs.release_created }}
run: |
git config user.name github-actions[bot]
git config user.email github-actions[bot]@users.noreply.github.com
git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/google-github-actions/release-please-action.git"
git tag -d stable || true
git push origin :stable || true
git tag -a stable -m "chore: release stable version ${{ steps.automated_release.outputs.tag_name }}"
git push origin stable
- name: πŸͺ¨ Publish to Open VSX Registry
if: ${{ steps.automated_release.outputs.release_created }}
uses: HaaLeo/publish-vscode-extension@v1
id: publish-open-vsx
with:
pat: ${{ secrets.OPEN_VSX_TOKEN }}
- name: πŸ’Ή Publish to Visual Studio Marketplace
if: ${{ steps.automated_release.outputs.release_created }}
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com
extensionFile: ${{ steps.publish-open-vsx.outputs.vsixPath }}
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: 🀑 Continuous Integration
on:
push:
pull_request:
types:
- opened
- reopened
- synchronize
jobs:
check:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
node-version: [21.x]
env:
SCOPRE_OWNER: '@pungrumpy'
runs-on: ${{ matrix.os }}
name: πŸ§ͺ
steps:
- name: πŸ”” Checkout
uses: actions/checkout@v4
- name: 🍞 Setup Bun
uses: oven-sh/setup-bun@v1
- name: 🌡 Cache bun
uses: actions/cache@v3
id: cache-bun
with:
path: ~/.bun
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
restore-keys: |
${{ runner.os }}-bun-
- name: πŸ—οΈ Build
run: |
bun add -g @vscode/vsce
vsce package --no-yarn
- name: πŸŽ… Upload Artifact
uses: actions/upload-artifact@v3
with:
name: dullahan-latest
path: dullahan-*.vsix

0 comments on commit c16f2df

Please sign in to comment.