This repository was archived by the owner on Aug 13, 2025. It is now read-only.
Rust Release #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Rust | |
| on: | |
| workflow_dispatch | |
| env: | |
| CARGO_TERM_COLOR: always | |
| permissions: | |
| contents: write | |
| actions: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: debian:bullseye | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build | |
| run: cargo build -r | |
| - name: Run tests | |
| run: cargo test | |
| - name: Get Current Date and Time | |
| id: get_datetime | |
| run: echo "datetime=$(date -u +"%Y-%m-%dT%H:%M:%SZ")" >> $GITHUB_ENV | |
| - name: Generate Tag Name | |
| id: generate_tag | |
| run: echo "tag_name=release-$(date -u +"%Y%m%d%H%M%S")" >> $GITHUB_ENV | |
| - name: Create Release | |
| id: create_release | |
| uses: actions/create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| draft: false | |
| prerelease: false | |
| release_name: ${{ env.datetime }} | |
| tag_name: ${{ env.tag_name }} | |
| body: | | |
| Automated release | |
| - name: Upload Release Asset | |
| id: upload-release-asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: target/release/codlinux | |
| asset_name: codlinux | |
| asset_content_type: application/octet-stream |