Fix workflow to publish executable and add the missing License
This commit is contained in:
parent
a2c678cdba
commit
e5d0219df8
2 changed files with 33 additions and 20 deletions
|
|
@ -1,4 +1,4 @@
|
|||
name: Publish Cargo Package
|
||||
name: Publish Release
|
||||
|
||||
on:
|
||||
push:
|
||||
|
|
@ -11,8 +11,6 @@ jobs:
|
|||
runs-on: ubuntu-22.04
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
CARGO_REGISTRIES_FORGEJO_TOKEN: Bearer ${{ secrets.FORGEJO_CARGO_TOKEN }}
|
||||
FORGEJO_CARGO_INDEX: ${{ github.server_url }}/${{ github.repository_owner }}/_cargo-index.git
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: https://data.forgejo.org/actions/checkout@v4
|
||||
|
|
@ -29,17 +27,6 @@ jobs:
|
|||
rustup default stable
|
||||
cargo --version
|
||||
|
||||
- name: Configure Cargo registry
|
||||
run: |
|
||||
mkdir -p "$HOME/.cargo"
|
||||
cat > "$HOME/.cargo/config.toml" <<EOF
|
||||
[registries.forgejo]
|
||||
index = "${FORGEJO_CARGO_INDEX}"
|
||||
|
||||
[net]
|
||||
git-fetch-with-cli = true
|
||||
EOF
|
||||
|
||||
- name: Verify tag matches package version
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
run: |
|
||||
|
|
@ -56,12 +43,17 @@ jobs:
|
|||
exit 1
|
||||
fi
|
||||
|
||||
- name: Check package can be published
|
||||
- name: Build release binary
|
||||
run: |
|
||||
. "$HOME/.cargo/env"
|
||||
cargo publish --dry-run --locked --registry forgejo
|
||||
cargo build --release --locked
|
||||
mv target/release/upvoters upvoters-linux-x86_64
|
||||
|
||||
- name: Publish package
|
||||
run: |
|
||||
. "$HOME/.cargo/env"
|
||||
cargo publish --locked --registry forgejo
|
||||
- name: Create release
|
||||
uses: https://data.forgejo.org/actions/forgejo-release@v2
|
||||
with:
|
||||
direction: upload
|
||||
tag: ${{ github.ref_name }}
|
||||
release-notes: "Release ${{ github.ref_name }}"
|
||||
files: upvoters-linux-x86_64
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
|
|||
21
LICENSE
Normal file
21
LICENSE
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2026 Alex Selimov
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
Loading…
Add table
Add a link
Reference in a new issue