Skip to content

Commit

Permalink
ci(release): combine release workflow into main workflow (#697)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeshuaro authored Jan 12, 2024
1 parent 0032f7f commit fbcd63f
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 45 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches:
- main
pull_request:
workflow_dispatch:
schedule:
- cron: "0 0 * * SUN"

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
Expand Down Expand Up @@ -66,3 +69,38 @@ jobs:
run: |
yarn
yarn lint
release:
name: Release
runs-on: ubuntu-latest
needs: [test, lint]
if: ${{ (github.ref == 'refs/heads/main') && (contains(fromJSON('["workflow_dispatch", "schedule"]'), github.event_name)) }}

steps:
- name: Create GitHub App token 🔑
id: create-app-token
uses: tibdex/[email protected]
with:
app_id: ${{ secrets.GH_APP_ID }}
private_key: ${{ secrets.GH_APP_PRIVATE_KEY }}

- name: Checkout 🛎️
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false

- name: Setup Node 💻
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: yarn

- name: Install dependencies 📦
run: yarn

- name: Release 🚀
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ steps.create-app-token.outputs.token }}
VSCE_PAT: ${{ secrets.VSCE_PAT }}
45 changes: 0 additions & 45 deletions .github/workflows/semantic-release.yml

This file was deleted.

0 comments on commit fbcd63f

Please sign in to comment.