Skip to content

Commit

Permalink
WIP ci: add release notes
Browse files Browse the repository at this point in the history
test release
  • Loading branch information
neolynx committed Feb 15, 2025
1 parent 1abb735 commit e910238
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 15 deletions.
31 changes: 20 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ jobs:
GOPROXY: "https://proxy.golang.org"

steps:
- name: "Install packages"
- name: "Install Packages"
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends graphviz gnupg2 gpgv2 git gcc make devscripts python3 python3-requests-unixsocket python3-termcolor python3-swiftclient python3-boto python3-azure-storage python3-etcd3 python3-plyvel flake8
- name: "Checkout repository"
- name: "Checkout Repository"
uses: actions/checkout@v4
with:
# fetch the whole repo for `git describe` to work
Expand All @@ -45,7 +45,7 @@ jobs:
run: |
make flake8
- name: "Read go version from go.mod"
- name: "Read Go Version"
run: |
gover=$(sed -n 's/^go \(.*\)/\1/p' go.mod)
echo "Go Version: $gover"
Expand Down Expand Up @@ -91,12 +91,12 @@ jobs:
sudo mkdir -p /srv ; sudo chown runner /srv
COVERAGE_DIR=${{ runner.temp }} make system-test
- name: "Merge code coverage"
- name: "Merge Code Coverage"
run: |
go install github.com/wadey/gocovmerge@latest
~/go/bin/gocovmerge unit.out ${{ runner.temp }}/*.out > coverage.txt
- name: "Upload code coverage"
- name: "Upload Code Coverage"
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down Expand Up @@ -148,13 +148,13 @@ jobs:
gcc-i686-linux-gnu gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: "Checkout repository"
- name: "Checkout Repository"
uses: actions/checkout@v4
with:
# fetch the whole repo for `git describe` to work
fetch-depth: 0

- name: "Read go version from go.mod"
- name: "Read Go Version"
run: |
gover=$(sed -n 's/^go \(.*\)/\1/p' go.mod)
echo "Go Version: $gover"
Expand Down Expand Up @@ -200,7 +200,7 @@ jobs:
.github/workflows/scripts/upload-artifacts.sh ci ${{ matrix.suite }}
- name: "Publish release to aptly"
if: startsWith(github.event.ref, 'refs/tags') && steps.aptlycreds.outputs.FOUND == 'yes'
if: startsWith(github.event.ref, 'refs/tags') && steps.aptlycreds.outputs.FOUND == 'yes' && false
env:
APTLY_USER: ${{ secrets.APTLY_USER }}
APTLY_PASSWORD: ${{ secrets.APTLY_PASSWORD }}
Expand All @@ -209,7 +209,7 @@ jobs:
ci-binary-build:
name: "Build"
needs: test
# needs: test
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -221,13 +221,13 @@ jobs:
- goos: darwin
goarch: arm
steps:
- name: "Checkout repository"
- name: "Checkout Repository"
uses: actions/checkout@v4
with:
# fetch the whole repo for `git describe` to work
fetch-depth: 0

- name: "Read go version from go.mod"
- name: "Read Go Version"
run: |
echo "GOVER=$(sed -n 's/^go \(.*\)/\1/p' go.mod)" >> $GITHUB_OUTPUT
id: goversion
Expand Down Expand Up @@ -274,12 +274,21 @@ jobs:
needs: ci-binary-build
if: startsWith(github.event.ref, 'refs/tags')
steps:
- name: "Checkout Repository"
uses: actions/checkout@v4

- name: "Download Artifacts"
uses: actions/download-artifact@v4
with:
path: out/

- name: "Create Release Notes"
run: |
echo -e "## Changes\n\n" > out/release-notes.md
dpkg-parsechangelog -S Changes | tail -n +4 >> out/release-notes.md
- name: "Release"
uses: softprops/action-gh-release@v2
with:
files: "out/**/aptly_*.zip"
body_path: "out/release-notes.md"
9 changes: 5 additions & 4 deletions Releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
- create branch release/1.x.y
- update debian/changelog
- create PR, merge when approved
- on updated master, git tag and push:
- on updated master, create release:
```
version=$(dpkg-parsechangelog -S Version)
echo Releasing prod version $version
git tag -a v$version -m 'aptly: release $version'
git push aptly-dev v$version
git push origin v$version master
```
- run swagger locally
- add generated swagger-1.x.y.json to www.aptly.info
- run swagger locally (`make docker-serve`)
- copy generated docs/swagger.json to https://github.com/aptly-dev/www.aptly.info/tree/master/static/swagger/aptly_1.x.y.json
- releae www.aptly.info
- create release announcement on https://github.com/aptly-dev/aptly/discussions

0 comments on commit e910238

Please sign in to comment.