Skip to content

Commit

Permalink
CI release action
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinleroy committed Aug 30, 2024
1 parent 53ccfdc commit 9ba45fa
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
17 changes: 2 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,14 @@ jobs:
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: DeterminateSystems/flake-checker-action@main
- run: nix develop --command cargo ws publish skip --no-remove-dev-deps --from-git --yes --token ${{ secrets.CRATES_IO }}
- run: nix develop --command ci-crate-pub ${{ secrets.CRATES_IO }}

publish-ide:
runs-on: ubuntu-latest
needs: publish-crates
steps:
- uses: actions/checkout@v3

- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: DeterminateSystems/flake-checker-action@main

- name: Build TS bindings
run: nix develop --command cargo make init-bindings

- name: Depot Setup
run: nix develop --command depot setup

- name: Publish Extension
run: |
cd ide/packages/extension
nix develop --command vsce package
nix develop --command vsce publish -p ${{ secrets.VSCODE_MRKT }} --packagePath argus-*.vsix
nix develop --command pnpx ovsx publish argus-*.vsix -p ${{ secrets.OVSX_MRKT }}
- run: nix develop --command ci-ext-pub ${{ secrets.VSCODE_MRKT }} ${{ secrets.OVSX_MRKT }}
16 changes: 16 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,27 @@
codespell .
cargo test
'';

publishCrates = pkgs.writeScriptBin "ci-crate-pub" ''
cargo ws publish skip --no-remove-dev-deps --from-git --yes --token "$1"
'';

publishExtension = pkgs.writeScriptBin "ci-ext-pub" ''
cargo make init-bindings
cd ide
depot setup
cd packages/extension
vsce package
vsce publish -p "$1" --packagePath argus-*.vsix
pnpx ovsx publish argus-*.vsix -p "$2"
'';
in {
devShell = with pkgs; mkShell {
nativeBuildInputs = [ pkg-config ];
buildInputs = [
checkProject
publishCrates
publishExtension

llvmPackages_latest.llvm
llvmPackages_latest.lld
Expand Down

0 comments on commit 9ba45fa

Please sign in to comment.