{"id":23534196,"url":"https://github.com/xhaiker/rust-release.action","last_synced_at":"2025-04-23T01:31:34.405Z","repository":{"id":50595122,"uuid":"449286902","full_name":"xhaiker/rust-release.action","owner":"xhaiker","description":"rust release action","archived":false,"fork":false,"pushed_at":"2023-04-07T13:07:36.000Z","size":28,"stargazers_count":7,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T08:04:07.452Z","etag":null,"topics":["action","actions","github-actions","rust","rust-lang"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xhaiker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-18T13:03:46.000Z","updated_at":"2024-11-21T04:01:21.000Z","dependencies_parsed_at":"2024-11-25T09:04:06.840Z","dependency_job_id":null,"html_url":"https://github.com/xhaiker/rust-release.action","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xhaiker%2Frust-release.action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xhaiker%2Frust-release.action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xhaiker%2Frust-release.action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xhaiker%2Frust-release.action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xhaiker","download_url":"https://codeload.github.com/xhaiker/rust-release.action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250352322,"owners_count":21416470,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["action","actions","github-actions","rust","rust-lang"],"created_at":"2024-12-26T00:15:36.685Z","updated_at":"2025-04-23T01:31:34.398Z","avatar_url":"https://github.com/xhaiker.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rust-release.action\n\n[![.github/workflows/test.yml](https://github.com/ihaiker/rust-release.action/actions/workflows/test.yaml/badge.svg)](https://github.com/ihaiker/rust-release.action/actions/workflows/test.yaml)\n[![.github/workflows/release.yml](https://github.com/ihaiker/rust-release.action/actions/workflows/release.yaml/badge.svg)](https://github.com/ihaiker/rust-release.action/actions/workflows/release.yaml)\n\n[中文文档](./README_zh.md)\n\nAutomate publishing Rust build artifacts for GitHub releases through GitHub Actions.\n\nThis action can work under the conditions of creating release, pushing tag and specifying release.\n\n## Inputs\n\n### release\n\nGithub release name (default from release action or tag action)\nCan not be specified, if you used release/tag action.\n\n### rust_target\n\n**Required** rust target.\nnow only support\n\n- x86_64_apple-darwin\n- x86_64-pc-windows-gnu\n- x86_64-unknown-linux-gnu\n\n### src_dir\n\nPath to directory containing Cargo.toml (defaults to project root)\n\n### pre_build\n\nRelative path of script to run before building\n\n### post_build\n\nRelative path of script to run after building\n\n### name\n\nthe project name (default repository name)\n\n### archive_name\n\nThe build artifact name (default `\u003cname\u003e`-`\u003carchive_suffix\u003e`)\n\n### extra_files\n\nList of extra files to include in build\nExample: README.md LISENSE\n\n### archive_suffix\n\nThis name is the suffix of the build artifact. (default to rust_target)\n\n### archive_types\n\nList of archive types to publish the binaries with, default \"zip\", supports zip and all tar formats\n\n### build_options\n\n`cargo build` options, more info see `cargo build --help`\n\n## Example usage\n\n### On **release** the project\n\n```yaml\nname: release\n\non:\n  release:\n    types: [created]\n\njobs:\n  release:\n    name: publish ${{ matrix.name }}\n    strategy:\n      fail-fast: true\n      matrix:\n        include:\n          - target: x86_64-pc-windows-gnu\n            suffix: windows-x86_64\n            archive: zip\n            name: x86_64-pc-windows-gnu\n          - target: x86_64-unknown-linux-gnu\n            suffix: linux-x86_64\n            archive: tar.xz\n            name: x86_64-unknown-linux-gnu\n          - target: x86_64-apple-darwin\n            suffix: darwin-x86_64\n            archive: tar.gz\n            name: x86_64-apple-darwin\n    runs-on: ubuntu-latest\n    steps:\n      - name: Clone test repository\n        uses: actions/checkout@v2\n      - uses: xhaiker/rust-release.action@v1.0.0\n        name: build ${{ matrix.name }}\n        with:\n          rust_target: ${{ matrix.target }}\n          archive_suffix: ${{ matrix.suffix }}\n          archive_types: ${{ matrix.archive }}\n          extra_files: \"README.md README_zh.md LICENSE\"\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\n### On **tag** the project\n\n```yaml\nname: release\non:\n  push:\n    tags:\n      - \"v*\"\n\njobs:\n  release:\n    name: Create Release\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@master\n      - name: Create Release\n        uses: actions/create-release@latest\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        with:\n          tag_name: ${{ github.ref }}\n          release_name: ${{ github.ref }}\n          draft: false\n          prerelease: false\n\n  publish:\n    name: publish ${{ matrix.name }}\n    needs:\n      - release\n    strategy:\n      fail-fast: true\n      matrix:\n        include:\n          - target: x86_64-pc-windows-gnu\n            suffix: windows-x86_64\n            archive: zip\n            name: x86_64-pc-windows-gnu\n          - target: x86_64-unknown-linux-gnu\n            suffix: linux-x86_64\n            archive: tar.xz\n            name: x86_64-unknown-linux-gnu\n          - target: x86_64-apple-darwin\n            suffix: darwin-x86_64\n            archive: tar.gz\n            name: x86_64-apple-darwin\n    runs-on: ubuntu-latest\n    steps:\n      - name: Clone test repository\n        uses: actions/checkout@v2\n      - uses: xhaiker/rust-release.action@v1.0.0\n        name: build ${{ matrix.name }}\n        with:\n          release: ${{ github.ref_name }}\n          rust_target: ${{ matrix.target }}\n          archive_suffix: ${{ matrix.suffix }}\n          archive_types: ${{ matrix.archive }}\n          extra_files: \"README.md README_zh.md LICENSE\"\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxhaiker%2Frust-release.action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxhaiker%2Frust-release.action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxhaiker%2Frust-release.action/lists"}