Skip to content

Commit

Permalink
Add release management tasks
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Gunnerson <[email protected]>
  • Loading branch information
chenxiaolong committed Aug 30, 2023
1 parent fb4b93b commit 387dcdc
Show file tree
Hide file tree
Showing 18 changed files with 704 additions and 175 deletions.
5 changes: 5 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[alias]
xtask = "run --package xtask --"

[env]
CARGO_WORKSPACE_DIR = { value = "", relative = true }
2 changes: 1 addition & 1 deletion .github/workflows/modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
>> "${GITHUB_OUTPUT}"
- name: Build and test
run: ./modules/build.py
run: cargo xtask modules -a

- name: Archive artifacts
uses: actions/upload-artifact@v3
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
on:
push:
# Uncomment to test against a branch
#branches:
# - ci
tags:
- 'v*'
jobs:
create_release:
name: Create Github release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Get version from tag
id: get_version
run: |
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
version=${GITHUB_REF#refs/tags/v}
else
version=0.0.0.${GITHUB_REF#refs/heads/}
fi
echo "version=${version}" >> "${GITHUB_OUTPUT}"
- name: Check out repository
uses: actions/checkout@v3

- name: Create release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: v${{ steps.get_version.outputs.version }}
name: Version ${{ steps.get_version.outputs.version }}
body_path: RELEASE.md
draft: true
prerelease: false
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!--
When adding new changelog entries, use [Issue #0] to link to issues and
[PR #0 @user] to link to pull requests. Then run:
cargo xtask update-changelog
to update the actual links at the bottom of the file.
-->

### Unreleased

* Initial Rust release. The old Python implementation can be found in the `python` branch. ([PR #130 @chenxiaolong])

<!-- Do not manually edit the lines below. Use `cargo xtask update-changelog` to regenerate. -->
[PR #130 @chenxiaolong]: https://github.com/chenxiaolong/avbroot/pull/130
48 changes: 48 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name = "avbroot"
version = "0.1.0"
license = "GPL-3.0-only"
edition = "2021"
repository = "https://github.com/chenxiaolong/avbroot"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down Expand Up @@ -74,4 +75,10 @@ assert_matches = "1.5.0"
static = ["bzip2/static", "xz2/static"]

[workspace]
members = ["e2e"]
members = ["e2e", "xtask"]

[workspace.package]
version = "0.1.0"
license = "GPL-3.0-only"
edition = "2021"
repository = "https://github.com/chenxiaolong/avbroot"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ To update Android or Magisk:
avbroot's Magisk modules can be found on the [releases page](https://github.com/chenxiaolong/avbroot/releases) or they can be built locally by running:
```bash
python modules/build.py
cargo xtask modules -a
```
This requires Java and the Android SDK to be installed. The `ANDROID_HOME` environment variable should be set to the Android SDK path.
Expand Down
7 changes: 7 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
The changelog can be found at: [`CHANGELOG.md`](./CHANGELOG.md).

---

See [`README.md`](./README.md) for information on how to install and use avbroot.

The downloads are digitally signed. Please consider [verifying the digital signatures](./README.md#verifying-digital-signatures) of the binaries (or building from source) since avbroot is an application with access to your OTA/AVB signing keys.
7 changes: 5 additions & 2 deletions e2e/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
[package]
name = "e2e"
version = "0.1.0"
edition = "2021"
version.workspace = true
license.workspace = true
edition.workspace = true
repository.workspace = true
publish = false

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
166 changes: 0 additions & 166 deletions modules/build.py

This file was deleted.

4 changes: 2 additions & 2 deletions modules/clearotacerts/module.prop
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id=com.chiller3.avbroot.clearotacerts
name=clearotacerts
version=v1.0
versionCode=1
version=v0.1.0
versionCode=256
author=chenxiaolong
description=Block A/B OTAs by clearing verification certificates
4 changes: 2 additions & 2 deletions modules/oemunlockonboot/module.prop
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id=com.chiller3.avbroot.oemunlockonboot
name=oemunlockonboot
version=v1.0
versionCode=1
version=v0.1.0
versionCode=256
author=chenxiaolong
description=Enable OEM unlocking on every boot
Loading

0 comments on commit 387dcdc

Please sign in to comment.