feat: automatic draft release
This commit is contained in:
parent
ef0c92ce09
commit
b4792451ab
5 changed files with 79 additions and 8 deletions
2
.github/workflows/docker_build_push.yml
vendored
2
.github/workflows/docker_build_push.yml
vendored
|
|
@ -4,6 +4,8 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- "develop"
|
- "develop"
|
||||||
- "main"
|
- "main"
|
||||||
|
tags:
|
||||||
|
- "*.*.*"
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [synchronize, opened]
|
types: [synchronize, opened]
|
||||||
|
|
||||||
|
|
|
||||||
73
.github/workflows/release.yml
vendored
73
.github/workflows/release.yml
vendored
|
|
@ -33,23 +33,55 @@ jobs:
|
||||||
platform: linux/arm64
|
platform: linux/arm64
|
||||||
tags-suffix: "-slim"
|
tags-suffix: "-slim"
|
||||||
|
|
||||||
- target: "gnu-s2n"
|
- target: "gnu"
|
||||||
|
build-feature: "-s2n"
|
||||||
platform: linux/amd64
|
platform: linux/amd64
|
||||||
tags-suffix: "-s2n"
|
tags-suffix: "-s2n"
|
||||||
|
|
||||||
- target: "gnu-s2n"
|
- target: "gnu"
|
||||||
|
build-feature: "-s2n"
|
||||||
platform: linux/arm64
|
platform: linux/arm64
|
||||||
tags-suffix: "-s2n"
|
tags-suffix: "-s2n"
|
||||||
|
|
||||||
|
- target: "gnu"
|
||||||
|
build-feature: "-native-roots"
|
||||||
|
platform: linux/amd64
|
||||||
|
tags-suffix: "-native-roots"
|
||||||
|
|
||||||
|
- target: "gnu"
|
||||||
|
build-feature: "-native-roots"
|
||||||
|
platform: linux/arm64
|
||||||
|
tags-suffix: "-native-roots"
|
||||||
|
|
||||||
|
- target: "musl"
|
||||||
|
build-feature: "-native-roots"
|
||||||
|
platform: linux/amd64
|
||||||
|
tags-suffix: "-slim-native-roots"
|
||||||
|
|
||||||
|
- target: "musl"
|
||||||
|
build-feature: "-native-roots"
|
||||||
|
platform: linux/arm64
|
||||||
|
tags-suffix: "-slim-native-roots"
|
||||||
|
|
||||||
|
- target: "gnu"
|
||||||
|
build-feature: "-s2n-native-roots"
|
||||||
|
platform: linux/amd64
|
||||||
|
tags-suffix: "-s2n-native-roots"
|
||||||
|
|
||||||
|
- target: "gnu"
|
||||||
|
build-feature: "-s2n-native-roots"
|
||||||
|
platform: linux/arm64
|
||||||
|
tags-suffix: "-s2n-native-roots"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- run: "echo 'The relese triggering workflows passed'"
|
- run: "echo 'The relese triggering workflows passed'"
|
||||||
|
|
||||||
- name: "set env"
|
- name: "set env"
|
||||||
#if [ ${{ github.ref_name == 'develop' }} ];then BUILD_NAME="-nightly";else BUILD_NAME="";fi
|
#if [ ${{ github.ref_name == 'develop' }} ];then BUILD_NAME="rpxy-nightly";else BUILD_NAME="rpxy";fi
|
||||||
run: |
|
run: |
|
||||||
if [ ${{ matrix.platform }} = "linux/amd64" ];then PLATFORM_MAP="x86_64";else PLATFORM_MAP="aarch64";fi
|
if [ ${{ matrix.platform }} = "linux/amd64" ];then PLATFORM_MAP="x86_64";else PLATFORM_MAP="aarch64";fi
|
||||||
echo "PLATFORM_MAP=${PLATFORM_MAP}" >> $GITHUB_ENV
|
echo "PLATFORM_MAP=${PLATFORM_MAP}" >> $GITHUB_ENV
|
||||||
echo "TARGET_NAME=rpxy-nightly-${PLATFORM_MAP}-unknown-linux-${{ matrix.target }}" >> $GITHUB_ENV
|
echo "TARGET_NAME=rpxy-${PLATFORM_MAP}-unknown-linux-${{ matrix.target }}${{ matrix.build-feature }}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: "docker pull and extract binary from docker image"
|
- name: "docker pull and extract binary from docker image"
|
||||||
id: "extract-binary"
|
id: "extract-binary"
|
||||||
|
|
@ -57,17 +89,46 @@ jobs:
|
||||||
CONTAINER_ID=`docker create --platform=${{ matrix.platform }} ghcr.io/junkurihara/rust-rpxy:nightly${{ matrix.tags-suffix }}`
|
CONTAINER_ID=`docker create --platform=${{ matrix.platform }} ghcr.io/junkurihara/rust-rpxy:nightly${{ matrix.tags-suffix }}`
|
||||||
docker cp ${CONTAINER_ID}:/rpxy/bin/rpxy /tmp/${TARGET_NAME}
|
docker cp ${CONTAINER_ID}:/rpxy/bin/rpxy /tmp/${TARGET_NAME}
|
||||||
cd /tmp
|
cd /tmp
|
||||||
tar zcvf ${TARGET_NAME}.tar.gz ${TARGET_NAME}
|
|
||||||
echo "artifact=${TARGET_NAME}" >> $GITHUB_OUTPUT
|
echo "artifact=${TARGET_NAME}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: "upload artifacts"
|
- name: "upload artifacts"
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ steps.extract-binary.outputs.artifact }}
|
name: ${{ steps.extract-binary.outputs.artifact }}
|
||||||
path: "/tmp/${{ steps.extract-binary.outputs.artifact }}.tar.gz"
|
path: "/tmp/${{ steps.extract-binary.outputs.artifact }}"
|
||||||
|
|
||||||
# on-failure:
|
# on-failure:
|
||||||
# runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
# if: ${{ github.event.workflow_run.conclusion == 'failure' }}
|
# if: ${{ github.event.workflow_run.conclusion == 'failure' }}
|
||||||
# steps:
|
# steps:
|
||||||
# - run: echo 'The release triggering workflows failed'
|
# - run: echo 'The release triggering workflows failed'
|
||||||
|
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
# if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
needs: on-success
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: download artifacts
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
path: /tmp/rpxy
|
||||||
|
|
||||||
|
- name: make tar.gz of assets
|
||||||
|
run: |
|
||||||
|
mkdir /tmp/assets
|
||||||
|
cd /tmp/rpxy
|
||||||
|
for i in ./*; do sh -c "cd $i && tar zcvf $i.tar.gz $i && mv $i.tar.gz /tmp/assets/"; done
|
||||||
|
ls -lha /tmp/assets
|
||||||
|
|
||||||
|
# - name: release
|
||||||
|
# uses: softprops/action-gh-release@v1
|
||||||
|
# if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
# with:
|
||||||
|
# files: /tmp/assets/*.tar.gz
|
||||||
|
# tag_name: ${{ github.ref }}
|
||||||
|
# draft: true
|
||||||
|
# prerelease: false
|
||||||
|
# generate_release_notes: true
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,14 @@
|
||||||
|
|
||||||
## 0.7.0 (unreleased)
|
## 0.7.0 (unreleased)
|
||||||
|
|
||||||
|
## 0.6.2
|
||||||
|
|
||||||
|
### Improvement
|
||||||
|
|
||||||
|
- Feat: Add a build feature of `native-roots` to use the system's default root cert store.
|
||||||
|
- Feat: Add binary release in addition to container release
|
||||||
|
- Refactor: lots of minor improvements
|
||||||
|
|
||||||
## 0.6.1
|
## 0.6.1
|
||||||
|
|
||||||
### Bugfix
|
### Bugfix
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "rpxy"
|
name = "rpxy"
|
||||||
version = "0.6.1"
|
version = "0.6.2"
|
||||||
authors = ["Jun Kurihara"]
|
authors = ["Jun Kurihara"]
|
||||||
homepage = "https://github.com/junkurihara/rust-rpxy"
|
homepage = "https://github.com/junkurihara/rust-rpxy"
|
||||||
repository = "https://github.com/junkurihara/rust-rpxy"
|
repository = "https://github.com/junkurihara/rust-rpxy"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "rpxy-lib"
|
name = "rpxy-lib"
|
||||||
version = "0.6.1"
|
version = "0.6.2"
|
||||||
authors = ["Jun Kurihara"]
|
authors = ["Jun Kurihara"]
|
||||||
homepage = "https://github.com/junkurihara/rust-rpxy"
|
homepage = "https://github.com/junkurihara/rust-rpxy"
|
||||||
repository = "https://github.com/junkurihara/rust-rpxy"
|
repository = "https://github.com/junkurihara/rust-rpxy"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue