fix ci? #43
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
create-release: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
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 install | ||
- 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 | ||
build-windows: | ||
needs: create-release | ||
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 install | ||
- 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: Upload Windows | ||
id: upload-release-asset-windows | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ jobs.create_release.outputs.upload_url }} | ||
Check failure on line 72 in .github/workflows/release.yml GitHub Actions / ReleaseInvalid workflow file
|
||
asset_path: fetchcat-win32-x64.zip | ||
asset_name: fetchcat-win.zip | ||
asset_content_type: application/octet-stream | ||
build-linux: | ||
needs: create-release | ||
runs-on: ubuntu-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 install | ||
- 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: Upload Linux Debian | ||
id: upload-release-asset-linux-debian | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ jobs.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: ${{ jobs.create_release.outputs.upload_url }} | ||
asset_path: fetchcat-linux.rpm | ||
asset_name: fetchcat-linux.rpm | ||
asset_content_type: application/octet-stream |