Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add publish workflow for utility crates #193

Merged
merged 1 commit into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
ci: add publish crate workflow
  • Loading branch information
lars-berger committed Feb 6, 2025
commit a64952bda579c195bc94ecce797979787d1781bb
43 changes: 43 additions & 0 deletions .github/workflows/publish-crate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Publish crate

on:
workflow_dispatch:
inputs:
crate-name:
type: choice
description: The name of the crate to publish.
options:
- systray-util
- shell-util
crate-version:
type: string
description: The version of the crate to publish.
required: true

permissions:
contents: read

jobs:
release:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@21dc36fb71dd22e3317045c0c31a3f4249868b17
with:
toolchain: nightly

- uses: swatinem/rust-cache@9bdad043e88c75890e36ad3bbc8d27f0090dd609

- name: Update version
shell: bash
run: |
CARGO_TOML="crates/${{ inputs.crate-name }}/Cargo.toml"
sed -i "s/^version = \".*\"/version = \"${{ inputs.crate-version }}\"/" $CARGO_TOML
echo "Updated version in Cargo.toml to ${{ inputs.crate-version }}"
cat $CARGO_TOML

- name: Publish crate
run: cargo publish -p ${{ inputs.crate-name }} --all-features --allow-dirty
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
7 changes: 4 additions & 3 deletions crates/shell-util/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[package]
name = "shell-util"
version = "0.0.0"
authors = ["you"]
license = ""
repository = ""
authors = ["Glzr Software Pte. Ltd."]
description = "A cross-platform library for executing shell commands."
license = "MIT"
repository = "https://github.com/glzr-io/zebar"
edition = "2021"

[dependencies]
Expand Down
7 changes: 4 additions & 3 deletions crates/systray-util/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[package]
name = "systray-util"
version = "0.0.0"
authors = ["you"]
license = ""
repository = ""
authors = ["Glzr Software Pte. Ltd."]
description = "A library for monitoring and interacting with system tray icons on Windows 10 and 11."
license = "MIT"
repository = "https://github.com/glzr-io/zebar"
edition = "2021"

[lib]
Expand Down
60 changes: 0 additions & 60 deletions crates/systray-util/src/window.rs

This file was deleted.

10 changes: 5 additions & 5 deletions examples/boilerplate-solid-ts/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<title>Zebar</title>
<script type="module" crossorigin src="./assets/index-C-3c-Jla.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-krRKcsR-.css">
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<p>
Boilerplate for SolidJS with TypeScript. Run <code>npm i</code> and
<code>npm run dev</code> in the <code>solid-ts</code> directory to
run this example.
</p>
</body>
</html>
Loading