From 899e47e1dd919baf442d0533bb5aa489304924c5 Mon Sep 17 00:00:00 2001 From: figorr <77553975+figorr@users.noreply.github.com> Date: Sat, 22 Jun 2024 00:30:14 +0200 Subject: [PATCH] Create release.yml --- .github/workflows/release.yml | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..1317e7f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,39 @@ +name: Release + +on: + release: + types: [published] + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + # Verify environment + - name: Verify environment + run: | + echo "Current directory: $(pwd)" + ls -al + node -v + npm -v + + # Install dependencies and build + - name: Install dependencies and build + run: | + cd $GITHUB_WORKSPACE # Cambia al directorio raĆ­z del repositorio + npm install + npm run build + ls -R dist + + # Upload build file to the release as an asset + - name: Upload build to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: dist/* + tag: ${{ github.ref }} + overwrite: true + file_glob: true