chore(init): fix add pr preview #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
branches: | |
- main # Trigger only on pushes to the main branch | |
workflow_dispatch: # Allow manual triggering | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # Required for Semantic Release to access full git history | |
- name: Set up SSH key for tags | |
env: | |
SSH_DEPLOY_KEY: ${{ secrets.SEMRELEASE_DEPLOY_KEY }} | |
run: | | |
mkdir -p ~/.ssh | |
echo "${SSH_DEPLOY_KEY}" > ~/.ssh/id_rsa | |
chmod 600 ~/.ssh/id_rsa | |
ssh-keyscan github.com >> ~/.ssh/known_hosts | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' # Use the latest Node.js version here | |
- name: Install dependencies | |
run: npm install # Assumes the project uses npm; adjust if using yarn or pnpm | |
- name: Run Semantic Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SSH_AUTH_SOCK: /tmp/ssh_auth.sock | |
run: npx semantic-release |