Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
figorr authored Jun 21, 2024
1 parent 5568668 commit 069ff9e
Showing 1 changed file with 14 additions and 26 deletions.
40 changes: 14 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,33 @@
name: Release
name: 'Release'

on:
release:
types: [published]

env:
NODE_VERSION: 20 # Define la versión de Node.js a utilizar

jobs:
build:
name: Build
release:
name: Prepare release
permissions: write-all
runs-on: ubuntu-latest
env:
NODE_VERSION: ${{ env.NODE_VERSION }} # Propaga la variable de entorno al trabajo

steps:
- name: Checkout repository
uses: actions/checkout@v2
- uses: actions/checkout@v2

# Verify environment
- name: Verify environment
# Build
- name: Build the file
run: |
echo "Current directory: $(pwd)"
ls -al
node -v
npm -v
# Install dependencies and build
- name: Install dependencies and build
run: |
cd $GITHUB_WORKSPACE
rm -rf /home/runner/work/platinum-weather-card-es/platinum-weather-card-es/node_modules
cd /home/runner/work/platinum-weather-card-es/platinum-weather-card-es
npm install
npm run build
ls -R dist
ls -R /home/runner/work/platinum-weather-card/platinum-weather-card-es/dist
# Upload build file to the release as an asset
- name: Upload build to release
# Upload build file to the releas as an asset.
- name: Upload javascript to release
uses: svenstaro/upload-release-action@v2

with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/*
file: /home/runner/work/platinum-weather-card-es/platinum-weather-card-es/dist/*
tag: ${{ github.ref }}
overwrite: true
file_glob: true

0 comments on commit 069ff9e

Please sign in to comment.