Skip to content

fix ci?

fix ci? #35

Workflow file for this run

name: Release
on:
push:
branches:
- main
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm ci
- name: Build Windows
run: npm run package
- name: Zip Windows
run: |
cd out/fetchcat-win32-x64
7z a -tzip ../../fetchcat-win32-x64.zip .
cd ../..
- name: Build Linux
run: |
npm run make
mv out/make/deb/x64/*.deb fetchcat-linux.deb
mv out/make/rpm/x64/*.rpm fetchcat-linux.rpm
- name: Get version
id: package
run: echo "::set-output name=version::$(node -p "require('./package.json').version")"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.package.outputs.version }}.${{ github.run_id }}
release_name: Release ${{ steps.package.outputs.version }}.${{ github.run_id }}
draft: false
prerelease: true
- name: List files
run: ls
- name: Upload Windows
id: upload-release-asset-windows
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: fetchcat-win32-x64.zip
asset_name: fetchcat-win.zip
asset_content_type: application/octet-stream
- name: Upload Linux Debian
id: upload-release-asset-linux-debian
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: fetchcat-linux.deb
asset_name: fetchcat-linux.deb
asset_content_type: application/octet-stream
- name: Upload Linux RPM
id: upload-release-asset-linux-rpm
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: fetchcat-linux.rpm
asset_name: fetchcat-linux.rpm
asset_content_type: application/octet-stream