Skip to content

Commit

Permalink
Add toolchain file
Browse files Browse the repository at this point in the history
  • Loading branch information
rcorre committed Nov 23, 2024
1 parent a865553 commit 8bbf452
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 73 deletions.
103 changes: 30 additions & 73 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,85 +6,42 @@ on:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
include:
- os: windows-latest
extension: .exe
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Build release binary
run: cargo build --release --locked

- uses: actions/upload-artifact@v4
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: linux
path: target/release/pbls

# publish:
# name: Publish
# needs: [build]
# runs-on: ubuntu-latest
# steps:
# - name: Checkout sources
# uses: actions/checkout@v4

# - uses: actions/download-artifact@v4

# - name: Build archive
# shell: bash
# run: |
# set -ex

# source="$(pwd)"
# mkdir -p runtime/grammars/sources
# tar xJf grammars/grammars.tar.xz -C runtime/grammars/sources
# rm -rf grammars

# cd "$(mktemp -d)"
# mv $source/bins-* .
# mkdir dist

# for dir in bins-* ; do
# platform=${dir#"bins-"}
# if [[ $platform =~ "windows" ]]; then
# exe=".exe"
# fi
# pkgname=helix-$GITHUB_REF_NAME-$platform
# mkdir -p $pkgname
# cp $source/LICENSE $source/README.md $pkgname
# mkdir $pkgname/contrib
# cp -r $source/contrib/completion $pkgname/contrib
# mv bins-$platform/runtime $pkgname/
# mv bins-$platform/hx$exe $pkgname
# chmod +x $pkgname/hx$exe

# if [[ "$platform" = "x86_64-linux" ]]; then
# mv bins-$platform/helix-*.AppImage* dist/
# fi

# if [ "$exe" = "" ]; then
# tar cJf dist/$pkgname.tar.xz $pkgname
# else
# 7z a -r dist/$pkgname.zip $pkgname
# fi
# done

# tar cJf dist/helix-$GITHUB_REF_NAME-source.tar.xz -C $source .
# mv dist $source/

# - name: Upload binaries to release
# uses: svenstaro/upload-release-action@v2
# if: env.preview == 'false'
# with:
# repo_token: ${{ secrets.GITHUB_TOKEN }}
# file: dist/*
# file_glob: true
# tag: ${{ github.ref_name }}
# overwrite: true

# - name: Upload binaries as artifact
# uses: actions/upload-artifact@v4
# if: env.preview == 'true'
# with:
# name: release
# path: dist/*
name: ${{ matrix.os }}
path: target/release/pbls${{ matrix.extension }}
if-no-files-found: error

publish:
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Download Artifacts
uses: actions/download-artifact@v4

- name: Create Release
env:
GH_TOKEN: ${{ github.token }}
run: |
ls
echo ref: ${{ github.ref_name }}
ls *
gh release list
4 changes: 4 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[toolchain]
channel = "stable"
components = ["rustfmt", "rust-src", "clippy"]

0 comments on commit 8bbf452

Please sign in to comment.