Compare commits
5 Commits
Author | SHA1 | Date |
---|---|---|
Paul van Tilburg | 1211fea46a | |
Paul van Tilburg | 182521aab7 | |
Paul van Tilburg | dadf5d3147 | |
Paul van Tilburg | 4b506541f3 | |
Paul van Tilburg | 47e28a7098 |
|
@ -2,7 +2,8 @@ name: "Release"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags: "v*"
|
tags:
|
||||||
|
- "v*"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
|
@ -20,22 +21,16 @@ jobs:
|
||||||
echo "Releasing version: $VERSION"
|
echo "Releasing version: $VERSION"
|
||||||
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Install Rust stable toolchain
|
- name: Get the release notes from the changelog
|
||||||
uses: https://github.com/actions-rs/toolchain@v1
|
run: |
|
||||||
with:
|
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
|
||||||
profile: minimal
|
RELEASE_NOTES=$(sed -n -e "/^## \[$VERSION\]/,/^## \[/{//"'!'"p;}" CHANGELOG.md | sed -e '1d;$d')
|
||||||
toolchain: stable
|
echo "Release notes:"
|
||||||
override: true
|
echo
|
||||||
|
echo "$RELEASE_NOTES"
|
||||||
- name: Install cargo-deb
|
echo "RELEASE_NOTES<<$EOF" >> "$GITHUB_ENV"
|
||||||
uses: https://github.com/brndnmtthws/rust-action-cargo-binstall@v1
|
echo "$RELEASE_NOTES" >> "$GITHUB_ENV"
|
||||||
with:
|
echo "$EOF" >> "$GITHUB_ENV"
|
||||||
packages: cargo-deb
|
|
||||||
|
|
||||||
- name: Run cargo-deb
|
|
||||||
uses: https://github.com/actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: deb
|
|
||||||
|
|
||||||
- name: Install Go
|
- name: Install Go
|
||||||
uses: actions/setup-go@v4
|
uses: actions/setup-go@v4
|
||||||
|
@ -47,11 +42,12 @@ jobs:
|
||||||
with:
|
with:
|
||||||
# This is available by default.
|
# This is available by default.
|
||||||
api_key: '${{ secrets.RELEASE_TOKEN }}'
|
api_key: '${{ secrets.RELEASE_TOKEN }}'
|
||||||
files: target/debian/sinoptik*.deb
|
files: FIXME
|
||||||
title: 'Release ${{ env.VERSION }}'
|
title: 'Release ${{ env.VERSION }}'
|
||||||
|
body: '${{ env.RELEASE_NOTES }}'
|
||||||
|
|
||||||
release-crate:
|
release-crate:
|
||||||
name: "Release crate"
|
name: "Release Rust crate"
|
||||||
runs-on: debian-latest
|
runs-on: debian-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
|
@ -80,3 +76,37 @@ jobs:
|
||||||
with:
|
with:
|
||||||
command: publish
|
command: publish
|
||||||
args: --registry luon
|
args: --registry luon
|
||||||
|
|
||||||
|
release-deb:
|
||||||
|
name: "Release Debian package"
|
||||||
|
runs-on: debian-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout sources
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Install Rust stable toolchain
|
||||||
|
uses: https://github.com/actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
|
|
||||||
|
- name: Install cargo-deb
|
||||||
|
uses: https://github.com/brndnmtthws/rust-action-cargo-binstall@v1
|
||||||
|
with:
|
||||||
|
packages: cargo-deb
|
||||||
|
|
||||||
|
- name: Run cargo-deb
|
||||||
|
uses: https://github.com/actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: deb
|
||||||
|
|
||||||
|
- name: Publish Debian package
|
||||||
|
env:
|
||||||
|
DEB_REPO_TOKEN: '${{ secrets.DEB_REPO_TOKEN }}'
|
||||||
|
run: |
|
||||||
|
curl --config <(printf "user=%s:%s" paul "${DEB_REPO_TOKEN}") \
|
||||||
|
--upload-file target/debian/sandbox*.deb \
|
||||||
|
https://git.luon.net/api/packages/paul/debian/pool/bookworm/main/upload
|
||||||
|
|
14
CHANGELOG.md
14
CHANGELOG.md
|
@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [0.2.9] - 2023-08-25
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
* Update release Gitea Actions workflow; add seperate job to release Debian
|
||||||
|
package to the new repository
|
||||||
|
|
||||||
|
### Security
|
||||||
|
|
||||||
|
* Update dependencies ([RUSTSEC-2023-0044](https://rustsec.org/advisories/RUSTSEC-2023-0044))
|
||||||
|
|
||||||
## [0.2.8] - 2023-06-05
|
## [0.2.8] - 2023-06-05
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
@ -131,7 +142,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
Initial release.
|
Initial release.
|
||||||
|
|
||||||
[Unreleased]: https://git.luon.net/paul/sinoptik/compare/v0.2.8...HEAD
|
[Unreleased]: https://git.luon.net/paul/sinoptik/compare/v0.2.9...HEAD
|
||||||
|
[0.2.9]: https://git.luon.net/paul/sinoptik/compare/v0.2.8...v0.2.9
|
||||||
[0.2.8]: https://git.luon.net/paul/sinoptik/compare/v0.2.7...v0.2.8
|
[0.2.8]: https://git.luon.net/paul/sinoptik/compare/v0.2.7...v0.2.8
|
||||||
[0.2.7]: https://git.luon.net/paul/sinoptik/compare/v0.2.6...v0.2.7
|
[0.2.7]: https://git.luon.net/paul/sinoptik/compare/v0.2.6...v0.2.7
|
||||||
[0.2.6]: https://git.luon.net/paul/sinoptik/compare/v0.2.5...v0.2.6
|
[0.2.6]: https://git.luon.net/paul/sinoptik/compare/v0.2.5...v0.2.6
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "sinoptik"
|
name = "sinoptik"
|
||||||
version = "0.2.8"
|
version = "0.2.9"
|
||||||
authors = [
|
authors = [
|
||||||
"Admar Schoonen <admar@luon.net",
|
"Admar Schoonen <admar@luon.net",
|
||||||
"Paul van Tilburg <paul@luon.net>"
|
"Paul van Tilburg <paul@luon.net>"
|
||||||
|
|
|
@ -108,7 +108,7 @@ fn merge(
|
||||||
// value.
|
// value.
|
||||||
let items = pollen_samples
|
let items = pollen_samples
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.zip(aqi_items.into_iter())
|
.zip(aqi_items)
|
||||||
.map(|(pollen_sample, aqi_item)| {
|
.map(|(pollen_sample, aqi_item)| {
|
||||||
let time = pollen_sample.time;
|
let time = pollen_sample.time;
|
||||||
let value = (pollen_sample.score as f32).max(aqi_item.value);
|
let value = (pollen_sample.score as f32).max(aqi_item.value);
|
||||||
|
|
Loading…
Reference in New Issue