Skip to content

Commit

Permalink
Add publish workflow
Browse files Browse the repository at this point in the history
This change adds a new workflow that we can use for publishing a new
version of the crate. The workflow has to manually be invoked and will
then perform the publishing from a more or less well-defined CI
environment.
  • Loading branch information
d-e-s-o committed Apr 30, 2023
1 parent 692f522 commit c015560
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/publish.yml
@@ -0,0 +1,27 @@
# Copyright (C) 2023 Daniel Mueller <deso@posteo.net>
# SPDX-License-Identifier: GPL-3.0-or-later

name: Publish

on:
workflow_dispatch:

jobs:
test:
uses: ./.github/workflows/test.yml
secrets: inherit
publish:
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Publish
run: cargo publish --no-verify --token "${CARGO_REGISTRY_TOKEN}"
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Expand Up @@ -6,6 +6,7 @@ name: Test
on:
push:
pull_request:
workflow_call:

env:
CARGO_TERM_COLOR: always
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
@@ -1,6 +1,7 @@
Unreleased
----------
- Introduced `static` feature for linking to `libreadline` statically
- Added GitHub Actions workflow for publishing the crate


0.3.1
Expand Down

0 comments on commit c015560

Please sign in to comment.