Skip to content

Commit

Permalink
fix(workflows): Actualización del workflow de release
Browse files Browse the repository at this point in the history
Ya funciona correctamente el workflow
  • Loading branch information
alesevbar committed Dec 17, 2024
1 parent c6845c4 commit 0133a76
Showing 1 changed file with 28 additions and 14 deletions.
42 changes: 28 additions & 14 deletions .github/workflows/release-with-changelog.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
name: Release Workflow

on:
pull_request:
types:
- closed
push:
branches:
- main

permissions:
contents: write
workflow_dispatch:

jobs:
release:
if: >
github.event.pull_request.merged == true &&
contains(github.event.pull_request.title, 'release')
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Check out the code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20.8.1'

- name: Set up Python
uses: actions/setup-python@v4
Expand All @@ -31,10 +33,22 @@ jobs:
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install jq
run: sudo apt-get install -y jq

- name: Run semantic-release
- name: Create temporary package.json
run: |
echo '{
"private": true,
"devDependencies": {}
}' > package.json
- name: Install semantic-release and plugins
run: |
npm install --save-dev semantic-release @semantic-release/git @semantic-release/changelog
- name: Run Semantic Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release

- name: Clean up temporary files
if: always()
run: rm package.json package-lock.json

0 comments on commit 0133a76

Please sign in to comment.