chore: bump version #47
Workflow file for this run
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: Publish Electron Binaries | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
build-electron-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node 16 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Build UI | |
working-directory: ./packages/ui | |
run: | | |
npm ci | |
npm run build-desktop | |
- name: Build deb, rpm | |
working-directory: ./packages/electron | |
run: | | |
npm ci | |
npm run publish | |
build-electron-windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node 16 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Build UI | |
working-directory: ./packages/ui | |
run: | | |
npm ci | |
npm run build-desktop | |
- name: Build windows installer | |
working-directory: ./packages/electron | |
run: | | |
npm ci | |
npm run publish | |
build-electron-mac: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node 16 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Build UI | |
working-directory: ./packages/ui | |
run: | | |
npm ci | |
npm run build-desktop | |
- name: Add MacOS certs | |
run: chmod +x scripts/add-osx-cert.sh && ./scripts/add-osx-cert.sh | |
env: | |
CERTIFICATE_OSX_APPLICATION: ${{ secrets.CERTIFICATE_OSX_APPLICATION }} | |
CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }} | |
- name: Build macos binaries | |
working-directory: ./packages/electron | |
env: | |
APPLE_ID: ${{ secrets.APPLE_ID }} | |
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} | |
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
run: | | |
npm ci | |
npm run publish | |
build-electron-snap: | |
needs: [build-electron-linux] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node 16 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Build UI | |
working-directory: ./packages/ui | |
run: | | |
npm ci | |
npm run build-desktop | |
- name: Build snap package | |
working-directory: ./packages/electron | |
run: | | |
npm ci | |
npm run build-snap | |
- name: Install Snapcraft | |
run: sudo apt-get install snapd snapcraft | |
- name: Set up Snap Store credentials & publish snap package | |
run: | | |
echo "${{ secrets.SNAP_STORE_TOKEN }}" | base64 -d > credentials.snapcraft | |
export SNAPCRAFT_STORE_CREDENTIALS=$(cat credentials.snapcraft) | |
snapcraft push --release=stable ./packages/electron/dist/*.snap | |
- name: Set asset name | |
run: echo "SNAP_FILE_NAME=$(basename $(ls ./packages/electron/dist/*.snap))" >> $GITHUB_ENV | |
- name: Upload snap to GitHub release | |
run: | | |
node scripts/upload-file-to-latest-draft-release.js ./packages/electron/dist/${{ env.SNAP_FILE_NAME }} | |
build-docker-image: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Extract version from tag | |
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV | |
- name: Build and tag docker image | |
working-directory: . | |
run: | | |
docker build -t flawiddsouza/restfox:${{ env.VERSION }} . | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Publish docker image | |
run: | | |
docker push flawiddsouza/restfox:${{ env.VERSION }} | |
update-release-notes: | |
needs: [build-electron-linux] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # Fetch all history | |
- name: Setup Node 16 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Generate & Update Release Notes | |
run: | | |
node scripts/update-release-notes.js |