Skip to content

cli test

cli test #41

name: Release Insiders
on:
push:
branches:
- search-cli-svelte-5
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm install
- name: Use linter
run: npm run lint
- name: Build mytril
run: npm run build
prepublish:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: New prerelease version
id: get_version_release
run: |
version=$(npm version prerelease --preid=insiders --no-git-tag-version)
echo "Generated version: $version" # DEBUG: Ajouter dans les logs pour vérifier
echo "version_release=${version}" >> $GITHUB_OUTPUT
- name: Inspect the working tree
run: |
echo "Inspecting Git status and diff..."
git status
git diff
- name: Commit & Push version change
if: github.event_name == 'push'
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git branch --show-current
git commit -a -m "New insiders version"
git status
git push
preview:
runs-on: ubuntu-latest
needs: prepublish
steps:
- uses: actions/checkout@v4
- name: Inspect the working tree
run: echo "The current branch is ${{ steps.get_version_release.outputs.version_release }}"
# - name: Use branch name output
# run: echo "The current branch is: ${{ steps.get_version_release.outputs.version_release }}"