GitHub Action
Reloaded Publish Action
This GitHub Action is designed to streamline the publishing process for Reloaded projects by automatically detecting and uploading artifacts to the appropriate locations, such as GitHub Releases, NuGet, and crates.io.
- 📦 Download artifacts generated by other GitHub Actions
- 🚀 Upload artifacts to GitHub Releases
- 📦 Publish NuGet packages to nuget.org
- 🦀 Publish Rust packages to crates.io
- 🔍 Automatically detect and upload the appropriate artifacts
To use this action in your GitHub workflow, add the following step:
publish-crate:
permissions:
contents: write
# Dependencies that produce publish-able artifacts.
needs: [build-and-test,build-c-headers,build-dotnet-library]
# Publish only on tags
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Publish artifacts
uses: Reloaded-Project/devops-publish-action@v1
with:
nuget-api-key: ${{ secrets.NUGET_KEY }}
crates-io-token: ${{ secrets.CRATES_IO_TOKEN }}
rust-project-paths: |
./path/to/rust/project1
./path/to/rust/project2
Input | Description | Required | Default |
---|---|---|---|
nuget-api-key |
NuGet API key for publishing packages | No | |
crates-io-token |
Crates.io token for publishing Rust packages | No | |
rust-project-paths |
List of paths to Rust projects | No | . |
artifacts-directory |
Path to the directory containing the artifacts | No | artifacts |
compressed-artifacts-directory |
Path to the directory containing the zipped artifacts | No | compressed-artifacts |
additional-publish-params |
Additional parameters for cargo publish | No | '' |
create-release |
Whether the artifacts should be uploaded to GitHub Releases | No | true |
checkout-current-repo |
Checks out the current repository. | No | true |
- Downloads all artifacts and re-uploads them to the GitHub Releases.
- Uploads all NuGet packages stored in artifacts to
nuget.org
- Uploads specified Rust project paths to
crates.io
Reloaded projects produce various types of artifacts, such as binaries, libraries, NuGet packages, and Rust packages. This action makes it easy to publish these artifacts.
This action is designed to be used in conjunction with actions such as:
This action centralizes the publishing logic, ensuring consistency across projects and reducing maintenance overhead.
Contributions are welcome!
If you encounter any issues or have suggestions for improvements, please open an issue or submit a pull request in this repository.
This project is licensed under the MIT License. See the LICENSE file for details.