Remove name value for snap publish action

This commit is contained in:
smartfrigde 2022-12-31 15:53:23 +01:00
parent 8aac607f8f
commit cb7067fd1a

View file

@ -8,231 +8,230 @@ env:
FORCE_COLOR: true FORCE_COLOR: true
jobs: jobs:
build-linux: build-linux:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v2 uses: actions/checkout@v2
- uses: pnpm/action-setup@v2 # Install pnpm using packageManager key in package.json - uses: pnpm/action-setup@v2 # Install pnpm using packageManager key in package.json
- name: Use Node.js 18 - name: Use Node.js 18
uses: actions/setup-node@v2 uses: actions/setup-node@v2
with: with:
node-version: 18 node-version: 18
cache: "pnpm" cache: "pnpm"
- name: Install Node dependencies - name: Install Node dependencies
run: pnpm install -g cargo-cp-artifact && pnpm install run: pnpm install -g cargo-cp-artifact && pnpm install
- name: Install Electron-Builder - name: Install Electron-Builder
run: pnpm install -g electron-builder run: pnpm install -g electron-builder
- name: Replace the version number - name: Replace the version number
run: cat src/utils.ts | sed -e 's/[[:digit:]]\.[[:digit:]]\.[[:digit:]]/DEV/g' | tee src/utils.ts > /dev/null run: cat src/utils.ts | sed -e 's/[[:digit:]]\.[[:digit:]]\.[[:digit:]]/DEV/g' | tee src/utils.ts > /dev/null
- name: Build - name: Build
run: npm run build && electron-builder --linux zip && electron-builder --arm64 --linux zip run: npm run build && electron-builder --linux zip && electron-builder --arm64 --linux zip
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: ArmCordLinux.zip name: ArmCordLinux.zip
path: dist/ArmCord-3.2.0.zip path: dist/ArmCord-3.2.0.zip
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: ArmCordLinuxArm64.zip name: ArmCordLinuxArm64.zip
path: dist/ArmCord-3.2.0-arm64.zip path: dist/ArmCord-3.2.0-arm64.zip
build-snap: build-snap:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v2 uses: actions/checkout@v2
- uses: pnpm/action-setup@v2 # Install pnpm using packageManager key in package.json - uses: pnpm/action-setup@v2 # Install pnpm using packageManager key in package.json
- name: Use Node.js 18 - name: Use Node.js 18
uses: actions/setup-node@v2 uses: actions/setup-node@v2
with: with:
node-version: 18 node-version: 18
cache: "pnpm" cache: "pnpm"
- name: Install Node dependencies - name: Install Node dependencies
run: pnpm install -g cargo-cp-artifact && pnpm install run: pnpm install -g cargo-cp-artifact && pnpm install
- name: Install Electron-Builder - name: Install Electron-Builder
run: pnpm install -g electron-builder run: pnpm install -g electron-builder
- name: Replace the version number - name: Replace the version number
run: cat src/utils.ts | sed -e 's/[[:digit:]]\.[[:digit:]]\.[[:digit:]]/DEV/g' | tee src/utils.ts > /dev/null run: cat src/utils.ts | sed -e 's/[[:digit:]]\.[[:digit:]]\.[[:digit:]]/DEV/g' | tee src/utils.ts > /dev/null
- name: Build - name: Build
run: npm run build && electron-builder --linux snap --config.snap.grade=devel run: npm run build && electron-builder --linux snap --config.snap.grade=devel
- name: Publish - uses: snapcore/action-publish@v1
- uses: snapcore/action-publish@v1 env:
env: SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_STORE_LOGIN }}
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_STORE_LOGIN }} with:
with: snap: dist/ArmCord_3.2.0_amd64.snap
snap: dist/ArmCord_3.2.0_amd64.snap release: edge
release: edge build-mac:
build-mac: runs-on: macos-latest
runs-on: macos-latest steps:
steps: - name: Checkout code
- name: Checkout code uses: actions/checkout@v2
uses: actions/checkout@v2
- uses: pnpm/action-setup@v2 # Install pnpm using packageManager key in package.json - uses: pnpm/action-setup@v2 # Install pnpm using packageManager key in package.json
- name: Use Node.js 18 - name: Use Node.js 18
uses: actions/setup-node@v2 uses: actions/setup-node@v2
with: with:
node-version: 18 node-version: 18
cache: "pnpm" cache: "pnpm"
- name: Install Node dependencies - name: Install Node dependencies
run: pnpm install -g cargo-cp-artifact && pnpm install run: pnpm install -g cargo-cp-artifact && pnpm install
- name: Install Electron-Builder - name: Install Electron-Builder
run: pnpm install -g electron-builder run: pnpm install -g electron-builder
- name: Replace the version number - name: Replace the version number
run: cat src/utils.ts | sed -e 's/[[:digit:]]\.[[:digit:]]\.[[:digit:]]/DEV/g' | tee src/utils.ts > /dev/null run: cat src/utils.ts | sed -e 's/[[:digit:]]\.[[:digit:]]\.[[:digit:]]/DEV/g' | tee src/utils.ts > /dev/null
- name: Build - name: Build
run: npm run build && electron-builder --macos zip run: npm run build && electron-builder --macos zip
env: env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: ArmCordMac.zip name: ArmCordMac.zip
path: dist/ArmCord-3.2.0-mac.zip path: dist/ArmCord-3.2.0-mac.zip
build-windows: build-windows:
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v2 uses: actions/checkout@v2
- uses: pnpm/action-setup@v2 # Install pnpm using packageManager key in package.json - uses: pnpm/action-setup@v2 # Install pnpm using packageManager key in package.json
- name: Use Node.js 18 - name: Use Node.js 18
uses: actions/setup-node@v2 uses: actions/setup-node@v2
with: with:
node-version: 18 node-version: 18
cache: "pnpm" cache: "pnpm"
- name: Install Node dependencies - name: Install Node dependencies
run: pnpm install -g cargo-cp-artifact && pnpm install run: pnpm install -g cargo-cp-artifact && pnpm install
- name: Install Electron-Builder - name: Install Electron-Builder
run: pnpm install -g electron-builder run: pnpm install -g electron-builder
- name: Replace the version number - name: Replace the version number
run: (Get-Content src/utils.ts) -replace "\d\.\d\.\d", "DEV" | Out-File src/utils.ts run: (Get-Content src/utils.ts) -replace "\d\.\d\.\d", "DEV" | Out-File src/utils.ts
- name: Build - name: Build
run: npm run build && electron-builder --windows zip run: npm run build && electron-builder --windows zip
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: ArmCordWindows.zip name: ArmCordWindows.zip
path: dist/ArmCord-3.2.0-win.zip path: dist/ArmCord-3.2.0-win.zip
build-windowsOnARM: build-windowsOnARM:
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: '18' node-version: '18'
- name: Checkout code - name: Checkout code
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Set architecture - name: Set architecture
run: set npm_config_arch=arm64 run: set npm_config_arch=arm64
- uses: pnpm/action-setup@v2 # Install pnpm using packageManager key in package.json - uses: pnpm/action-setup@v2 # Install pnpm using packageManager key in package.json
- name: Install Node dependencies - name: Install Node dependencies
run: pnpm install -g cargo-cp-artifact && pnpm install run: pnpm install -g cargo-cp-artifact && pnpm install
- name: Install Electron-Builder - name: Install Electron-Builder
run: pnpm install -g electron-builder run: pnpm install -g electron-builder
- name: Replace the version number - name: Replace the version number
run: (Get-Content src/utils.ts) -replace "\d\.\d\.\d", "DEV" | Out-File src/utils.ts run: (Get-Content src/utils.ts) -replace "\d\.\d\.\d", "DEV" | Out-File src/utils.ts
- name: Build - name: Build
run: npm run build && electron-builder --windows zip --arm64 run: npm run build && electron-builder --windows zip --arm64
env: env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: ArmCordWindowsArm64.zip name: ArmCordWindowsArm64.zip
path: dist\ArmCord-3.2.0-arm64-win.zip path: dist\ArmCord-3.2.0-arm64-win.zip
release: release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [build-linux, build-mac, build-windows, build-windowsOnARM] needs: [build-linux, build-mac, build-windows, build-windowsOnARM]
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v2 uses: actions/checkout@v2
- uses: actions/download-artifact@v2 - uses: actions/download-artifact@v2
with: with:
name: ArmCordMac.zip name: ArmCordMac.zip
path: macos path: macos
- uses: actions/download-artifact@v2 - uses: actions/download-artifact@v2
with: with:
name: ArmCordWindows.zip name: ArmCordWindows.zip
path: windows path: windows
- uses: actions/download-artifact@v2 - uses: actions/download-artifact@v2
with: with:
name: ArmCordLinux.zip name: ArmCordLinux.zip
path: linux path: linux
- uses: actions/download-artifact@v2 - uses: actions/download-artifact@v2
with: with:
name: ArmCordLinuxArm64.zip name: ArmCordLinuxArm64.zip
path: linux path: linux
- uses: actions/download-artifact@v2 - uses: actions/download-artifact@v2
with: with:
name: ArmCordWindowsArm64.zip name: ArmCordWindowsArm64.zip
path: windows path: windows
- name: Get some values needed for the release - name: Get some values needed for the release
id: vars id: vars
shell: bash shell: bash
run: | run: |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- uses: dev-drprasad/delete-tag-and-release@v0.2.0 - uses: dev-drprasad/delete-tag-and-release@v0.2.0
with: with:
delete_release: true delete_release: true
tag_name: devbuild tag_name: devbuild
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create the release - name: Create the release
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
tag_name: devbuild tag_name: devbuild
name: Dev Build ${{ steps.vars.outputs.sha_short }} name: Dev Build ${{ steps.vars.outputs.sha_short }}
draft: false draft: false
prerelease: true prerelease: true
body_path: .github/release.md body_path: .github/release.md
files: | files: |
linux/ArmCord-3.2.0.zip linux/ArmCord-3.2.0.zip
linux/ArmCord-3.2.0-arm64.zip linux/ArmCord-3.2.0-arm64.zip
macos/ArmCord-3.2.0-mac.zip macos/ArmCord-3.2.0-mac.zip
windows/ArmCord-3.2.0-win.zip windows/ArmCord-3.2.0-win.zip
windows/ArmCord-3.2.0-arm64-win.zip windows/ArmCord-3.2.0-arm64-win.zip