Skip to content
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
13 changes: 11 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,23 @@ on:
jobs:
publish:
runs-on: ubuntu-latest
# Source: https://crates.io/docs/trusted-publishing
environment: release # Optional: for enhanced security
permissions:
id-token: write # Required for OIDC token exchange
steps:
- uses: actions/checkout@v5
- uses: rust-lang/crates-io-auth-action@v1
id: auth
- run: cargo publish
env:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}

# Source: https://medium.com/@usman_qb
- name: Create release body
id: create_release_body
run: |
RELEASEVERSION="[${{ github.ref_name }}]"
RELEASEVERSION="[${{ github.ref_name.slice(1) }}]"
echo "Version: $RELEASEVERSION"
RELEASEBODY=$(awk -v ver="$RELEASEVERSION" '/^## / { if (p) { exit }; if ($2 == ver) { p=1; next } } p && NF' CHANGELOG.md)
{
Expand All @@ -28,5 +37,5 @@ jobs:
run: |
echo "Creating release for ${{ github.ref_name }}"
echo "${{ steps.create_release_body.outputs.RELEASEBODY }}"
gh release create "${{ github.ref_name }}" --title "release_${{ github.ref_name }}" --notes "${{ steps.create_release_body.outputs.RELEASEBODY }}"
gh release create "${{ github.ref_name }}" --title "${{ github.ref_name }}" --notes "${{ steps.create_release_body.outputs.RELEASEBODY }}"
echo "Release created successfully"
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rand_core"
version = "0.10.0-rc-1"
version = "0.10.0-rc-2"
authors = ["The Rand Project Developers", "The Rust Project Developers"]
license = "MIT OR Apache-2.0"
readme = "README.md"
Expand Down