Skip to content

Make Release

Make Release #72

Workflow file for this run

on:
workflow_dispatch:
inputs:
versionNumber:
description: "User-facing version number (eg: 0.13.0)"
required: true
name: Make Release
jobs:
branch_and_tag:
name: Update Release Branch
runs-on: ubuntu-latest
steps:
- name: Merge to Release Branch
uses: devmasx/[email protected]
with:
type: now
target_branch: release
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout Release Branch
uses: actions/checkout@v4
with:
ref: release
- name: Update Polaris Version in Cargo.toml
run: gawk -i inplace '/^version/ { if (count == 0) { $3 = "\"${{ github.event.inputs.versionNumber }}\""; count++ } } 1' Cargo.toml
- name: Commit Cargo.toml Version Change
uses: EndBug/add-and-commit@v9
with:
message: "Updated version number"
tag: -f -a ${{ github.event.inputs.versionNumber }} -m "Version number"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
windows:
name: Windows
runs-on: windows-latest
needs: create_release
steps:
- name: Checkout Polaris
uses: actions/checkout@v4
with:
ref: release
- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
- name: Make release
uses: ./.github/actions/make-windows-release
with:
version-number: ${{ github.event.inputs.versionNumber }}
output-file: polaris.msi
- name: Upload installer
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
path: polaris.msi
linux:
name: Linux
runs-on: ubuntu-latest
needs: create_release
steps:
- name: Checkout Polaris
uses: actions/checkout@v4
with:
ref: release
- name: Make release
uses: ./.github/actions/make-linux-release
with:
version-number: ${{ github.event.inputs.versionNumber }}
output-file: polaris.tar.gz
- name: Upload release
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
path: polaris.tar.gz
create_release:
name: Create Github Release
runs-on: ubuntu-latest
needs:
- windows
- linux
steps:
- name: Download Windows installer
uses: actions/download-artifact@v4
with:
name: polaris.msi
- name: Name Windows installer
run: mv polaris.msi Polaris_${{ github.event.inputs.versionNumber }}.msi
- name: Download Linux release
uses: actions/download-artifact@v4
with:
name: polaris.tar.gz
- name: Name Linux release
run: mv polaris.tar.gz Polaris_${{ github.event.inputs.versionNumber }}.tar.gz
- name: Make Github release
uses: softprops/action-gh-release@v2
with:
body: 'Release notes are documented in [CHANGELOG.md](https://github.com/agersant/polaris/blob/master/CHANGELOG.md)'
draft: true
prerelease: false
name: Polaris ${{ github.event.inputs.versionNumber }}
tag_name: ${{ github.event.inputs.versionNumber }}
files:
- Polaris_${{ github.event.inputs.versionNumber }}.tar.gz

Check failure on line 113 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / Make Release

Invalid workflow file

The workflow is not valid. .github/workflows/release.yml (Line: 113, Col: 13): A sequence was not expected
- Polaris_${{ github.event.inputs.versionNumber }}.msi