Skip to content

Commit

Permalink
ci/cd: draft-release action
Browse files Browse the repository at this point in the history
  • Loading branch information
SpontanCombust committed Jan 27, 2024
1 parent 1656e48 commit 62301d2
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: draft-release

on:
push:
tags: '*'

env:
CARGO_TERM_COLOR: always

jobs:
release:
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup npm
uses: actions/setup-node@v4
- name: Setup rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: x86_64-pc-windows-msvc
override: true

- name: Build with Cargo
run: cargo build --release --target=x86_64-pc-windows-msvc

- name: Pack the client
run: cargo xtask package .

- name: Create draft release
uses: ncipollo/release-action@v1
with:
artifacts: "*.vsix"
draft: true
generateReleaseNotes: true
2 changes: 2 additions & 0 deletions xtask/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

This crate provides automation scripts for the repo. They are OS-agnostic as they don't directly use any specific shell. All you need is the `cargo xtask` command.

Beware, these tasks are used in github workflows, so make sure any breaking changes are also reflected in `.github/workflows`.

More about xtask workflow [here](https://github.com/matklad/cargo-xtask).

0 comments on commit 62301d2

Please sign in to comment.