Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release many draft with same name #571

Open
kangfenmao opened this issue Jan 8, 2025 · 3 comments
Open

Release many draft with same name #571

kangfenmao opened this issue Jan 8, 2025 · 3 comments

Comments

@kangfenmao
Copy link

image

name: Release

on:
  workflow_dispatch:
  push:
    tags:
      - v*.*.*

permissions:
  contents: write

jobs:
  release:
    runs-on: ${{ matrix.os }}

    strategy:
      matrix:
        os: [macos-latest, windows-latest, ubuntu-latest]

    steps:
      - name: Check out Git repository
        uses: actions/checkout@v3

      - name: Install Node.js
        uses: actions/setup-node@v3
        with:
          node-version: 20

      - name: Install corepack
        run: corepack enable && corepack prepare [email protected] --activate

      - name: Get yarn cache directory path
        id: yarn-cache-dir-path
        run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT

      - name: Cache yarn dependencies
        uses: actions/cache@v3
        with:
          path: |
            ${{ steps.yarn-cache-dir-path.outputs.dir }}
            node_modules
          key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
          restore-keys: |
            ${{ runner.os }}-yarn-

      - name: Install Dependencies
        run: yarn install

      - name: Build Linux
        if: matrix.os == 'ubuntu-latest'
        run: |
          yarn build:npm linux
          yarn build:linux

        env:
          GH_TOKEN: ${{ secrets.GH_TOKEN }}

      - name: Build Mac
        if: matrix.os == 'macos-latest'
        run: |
          yarn build:npm mac
          yarn build:mac
        env:
          CSC_LINK: ${{ secrets.CSC_LINK }}
          CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
          APPLE_ID: ${{ vars.APPLE_ID }}
          APPLE_APP_SPECIFIC_PASSWORD: ${{ vars.APPLE_APP_SPECIFIC_PASSWORD }}
          APPLE_TEAM_ID: ${{ vars.APPLE_TEAM_ID }}
          GH_TOKEN: ${{ secrets.GH_TOKEN }}

      - name: Build Windows
        if: matrix.os == 'windows-latest'
        run: yarn build:win
        env:
          GH_TOKEN: ${{ secrets.GH_TOKEN }}

      - name: Replace spaces in filenames
        run: node scripts/replace-spaces.js

      - name: Release
        uses: softprops/action-gh-release@v2
        with:
          draft: true
          files: |
            dist/*.exe
            dist/*.zip
            dist/*.dmg
            dist/*.AppImage
            dist/*.snap
            dist/*.deb
            dist/*.rpm
            dist/*.tar.gz
            dist/latest*.yml
            dist/*.blockmap
        env:
          GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
@kangfenmao
Copy link
Author

kangfenmao commented Jan 8, 2025

logs:

Run softprops/action-gh-release@v2
  with:
    draft: true
    files: dist/*.exe
  dist/*.zip
  dist/*.dmg
  dist/*.AppImage
  dist/*.snap
  dist/*.deb
  dist/*.rpm
  dist/*.tar.gz
  dist/latest*.yml
  dist/*.blockmap
  
    token: ***
  env:
    GITHUB_TOKEN: ***
🤔 Pattern 'dist/*.zip' does not match any files.
🤔 Pattern 'dist/*.dmg' does not match any files.
🤔 Pattern 'dist/*.AppImage' does not match any files.
🤔 Pattern 'dist/*.snap' does not match any files.
🤔 Pattern 'dist/*.deb' does not match any files.
🤔 Pattern 'dist/*.rpm' does not match any files.
🤔 Pattern 'dist/*.tar.gz' does not match any files.
👩‍🏭 Creating new GitHub release for tag v0.9.5...
⬆️ Uploading Cherry-Studio-0.9.5-setup.exe...
⬆️ Uploading Cherry-Studio-0.9.5-portable.exe...
⬆️ Uploading latest.yml...
⬆️ Uploading Cherry-Studio-0.9.5-setup.exe.blockmap...
✅ Uploaded latest.yml
✅ Uploaded Cherry-Studio-0.9.5-setup.exe.blockmap
✅ Uploaded Cherry-Studio-0.9.5-portable.exe
✅ Uploaded Cherry-Studio-0.9.5-setup.exe
🎉 Release ready at https://github.com/CherryHQ/cherry-studio/releases/tag/untagged-76b21497def22f2097f0

@kangfenmao
Copy link
Author

image

@kangfenmao
Copy link
Author

ncipollo/release-action@v1 works fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant