Skip to content

Nightly build

Nightly build #550

Workflow file for this run

name: Nightly build
on:
# Trigger the workflow every day at 5 AM (UTC).
schedule:
- cron: '0 5 * * *'
# Also allow manual dispatch.
workflow_dispatch:
inputs:
dry-run:
type: boolean
default: true
description: "Dry run"
jobs:
nightly-build:
runs-on: ubuntu-latest
steps:
- name: Check out vscode-lingua-franca repository
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 1
- name: Set the time zone to Berkeley, CA
run: |
sudo timedatectl set-timezone America/Los_Angeles
- name: Configure Git for francabot
uses: lf-lang/lingua-franca/.github/actions/setup-francabot@master
with:
gpg-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Pull the latest lingua-franca submodule
run: |
git checkout master
git pull
git submodule update --init --recursive
working-directory: lingua-franca
- name: Commit to the `latest` branch
run: |
git add lingua-franca
git status --porcelain | grep . && git commit -m 'Update lingua-franca submodule'
git switch latest || git checkout -b latest
git reset --hard HEAD@{1}
git push -f --set-upstream origin latest
shell: bash
if: ${{ github.event.inputs.dry-run != 'true' }}
- name: Set the nightly version number
run: |
./.github/scripts/nightly-version.sh
- name: Build the extension
uses: ./.github/actions/build
with:
package: true
partial: true
pre-release: true
- name: Deploy nightly release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.PUBLISH_RELEASE }}"
automatic_release_tag: 'nightly'
prerelease: true
title: "Lingua Franca VS Code Nightly"
files: |
vscode-lingua-franca-*.vsix
if: ${{ github.event.inputs.dry-run != 'true' }}
- name: Upload build artifact (dry run only)
uses: actions/upload-artifact@v4
with:
name: Nightly VS Code extension
path: vscode-lingua-franca-${{ env.version }}.vsix
if-no-files-found: error
retention-days: 3
if: ${{ github.event.inputs.dry-run == 'true' }}
- name: Publish to Visual Studio Marketplace
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com
extensionFile: vscode-lingua-franca-${{ env.version }}.vsix
preRelease: true
dryRun: ${{ github.event.inputs.dry-run == 'true' }}
- name: Publish to Open VSX Registry
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.OPEN_VSX_TOKEN }}
extensionFile: vscode-lingua-franca-${{ env.version }}.vsix
preRelease: true
dryRun: ${{ github.event.inputs.dry-run == 'true' }}