Skip to content

on open run norminette #27

on open run norminette

on open run norminette #27

Workflow file for this run

name: Build and Release
on:
push:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
update_version:
permissions:
contents: write
runs-on: ubuntu-latest
outputs:
new_tag: ${{ steps.tag_version.outputs.new_tag }}
steps:
- uses: actions/checkout@v4
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
build_linux:
needs: update_version
runs-on: ubuntu-latest
# permissions:
# contents: write
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --release --target x86_64-unknown-linux-gnu
- run: mv target/x86_64-unknown-linux-gnu/release/norminette_lsp norminette_lsp-x86_64-unknown-linux-gnu
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: x86_64-unknown-linux-gnu
path: norminette_lsp-x86_64-unknown-linux-gnu
build_macos:
needs: update_version
runs-on: macos-latest
# permissions:
# contents: write
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --release --target aarch64-apple-darwin
- run: mv target/aarch64-apple-darwin/release/norminette_lsp norminette_lsp-aarch64-apple-darwin
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: aarch64-apple-darwin
path: norminette_lsp-aarch64-apple-darwin
release:
needs: [update_version, build_linux, build_macos]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download Linux Artifact
uses: actions/download-artifact@v4
with:
name: x86_64-unknown-linux-gnu
- name: Download macOS Artifact
uses: actions/download-artifact@v4
with:
name: aarch64-apple-darwin
- name: Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ needs.update_version.outputs.new_tag }}
files: |
norminette_lsp-x86_64-unknown-linux-gnu
norminette_lsp-aarch64-apple-darwin