This commit is contained in:
Antoine Gersant 2024-09-29 12:46:17 -07:00
parent 7ae10c6f74
commit 6a46aaeac6
3 changed files with 45 additions and 56 deletions

View file

@ -20,7 +20,7 @@ jobs:
- name: Install libsqlite3-dev
if: contains(matrix.os, 'ubuntu') && !contains(matrix.features, 'bundle-sqlite')
run: sudo apt-get update && sudo apt-get install libsqlite3-dev
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal

View file

@ -15,7 +15,7 @@ jobs:
steps:
- name: Checkout Polaris
uses: actions/checkout@v2
uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal

View file

@ -20,7 +20,7 @@ jobs:
target_branch: release
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout Release Branch
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: release
- name: Update Polaris Version in Cargo.toml
@ -39,30 +39,6 @@ jobs:
git tag -f -a ${{ github.event.inputs.versionNumber }} -m "Version number"
git push -f --tags
create_release:
name: Create Github Release
runs-on: ubuntu-latest
needs: branch_and_tag
steps:
- name: Create Github Release
id: create_release
uses: actions/create-release@v1.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.inputs.versionNumber }}
release_name: Polaris ${{ github.event.inputs.versionNumber }}
draft: true
prerelease: false
- name: Write Upload URL To Disk
run: echo "${{ steps.create_release.outputs.upload_url }}" > upload-url
- name: Store Upload URL
uses: actions/upload-artifact@v4
with:
name: release
path: upload-url
windows:
name: Windows
runs-on: windows-latest
@ -70,7 +46,7 @@ jobs:
steps:
- name: Checkout Polaris
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: release
- name: Install Rust Toolchain
@ -82,22 +58,11 @@ jobs:
with:
version-number: ${{ github.event.inputs.versionNumber }}
output-file: polaris.msi
- name: Retrieve Upload URL
uses: actions/download-artifact@v4
- name: Upload installer
uses: actions/upload-artifact@v4
with:
name: release
- name: Read Upload URL
shell: bash
run: echo "UPLOAD_URL=$(cat release/upload-url)" >> $GITHUB_ENV
- name: Upload Installer To Github Release
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ env.UPLOAD_URL }}
asset_path: polaris.msi
asset_name: Polaris_${{ github.event.inputs.versionNumber }}.msi
asset_content_type: application/x-msi
if-no-files-found: error
path: polaris.msi
linux:
name: Linux
@ -106,7 +71,7 @@ jobs:
steps:
- name: Checkout Polaris
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: release
- name: Make release
@ -114,18 +79,42 @@ jobs:
with:
version-number: ${{ github.event.inputs.versionNumber }}
output-file: polaris.tar.gz
- name: Retrieve Upload URL
- 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: release
- name: Read Upload URL
run: echo "UPLOAD_URL=$(cat release/upload-url)" >> $GITHUB_ENV
- name: Upload To Github Release
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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:
upload_url: ${{ env.UPLOAD_URL }}
asset_path: polaris.tar.gz
asset_name: Polaris_${{ github.event.inputs.versionNumber }}.tar.gz
asset_content_type: application/gzip
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
- Polaris_${{ github.event.inputs.versionNumber }}.msi