Skip to content

Publish Daily

Publish Daily #916

Workflow file for this run

name: Publish Daily
on:
schedule:
- cron: "0 0 * * *" # Every day at 0:00
workflow_dispatch: # or manually
jobs:
publish_amd64:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: install snapcraft
run: sudo snap install snapcraft --classic
- name: build snap
continue-on-error: true
run: |
sudo snapcraft --destructive-mode --verbose
sudo rm -rf $HOME/.config/snapcraft
- name: Copy snapcraft logs
continue-on-error: true
run: |
sudo cp -r /root/.local/state/snapcraft/log/ ./
- name: Upload log artifact
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: snapcraft-log
path: log/*
- name: publish snap
if: github.repository_owner == 'FreeCAD' # Do not run on forks
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }}
run: snapcraft upload --release=edge freecad*.snap
- name: Gather snap package name
run: |
snapArtifactPath=$(find . -type f -name *.snap)
echo "Snap package name is: '$snapArtifactPath'"
echo "snapArtifactPath=$snapArtifactPath" >> $GITHUB_ENV
- name: Upload snap package artifact
uses: actions/upload-artifact@v4
with:
name: snap-package
path: ${{ env.snapArtifactPath }}