Skip to content

Merge pull request #3 from JuliaPluto/dr14/ci #1

Merge pull request #3 from JuliaPluto/dr14/ci

Merge pull request #3 from JuliaPluto/dr14/ci #1

Workflow file for this run

name: Release
on:
push:
branches:
- main # semantic-release works on branch pushes, not tags
permissions:
contents: write # Required for creating releases and pushing commits
issues: write # Required for commenting on issues
pull-requests: write # Required for commenting on PRs
jobs:
# Call the CI workflow to run all validation, linting, tests, and build
ci:
name: Run CI
uses: ./.github/workflows/ci.yml
# Automated release with semantic-release
release:
name: Semantic Release
runs-on: ubuntu-latest
needs: ci
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for semantic-release
persist-credentials: false # Use custom token for pushing
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Verify package.json and package-lock.json are in sync
run: npm ci --dry-run
- name: Run semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Uncomment if publishing to VS Code Marketplace
# VSCE_PAT: ${{ secrets.VSCE_PAT }}
run: |
npx semantic-release
# Optional: Manual tag-based release (fallback if semantic-release is not used)
# This job only runs when a tag is pushed
# manual-release:
# name: Manual Tag Release
# if: startsWith(github.ref, 'refs/tags/v')
# runs-on: ubuntu-latest
#
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
#
# - name: Get version from tag
# id: get_version
# run: |
# TAG=${GITHUB_REF#refs/tags/}
# VERSION=${TAG#v}
# echo "version=$VERSION" >> $GITHUB_OUTPUT
# echo "tag=$TAG" >> $GITHUB_OUTPUT
#
# - name: Download VSIX artifact
# uses: actions/download-artifact@v4
# with:
# name: vsix-package
#
# - name: Create GitHub Release
# uses: softprops/action-gh-release@v2
# with:
# tag_name: ${{ steps.get_version.outputs.tag }}
# name: Release ${{ steps.get_version.outputs.version }}
# files: '*.vsix'
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}