Skip to content

Commit

Permalink
Merge pull request #592 from DefGuard/dev
Browse files Browse the repository at this point in the history
Merge DEV branch
  • Loading branch information
j-chmielewski authored Mar 19, 2024
2 parents c611a91 + 3c1d864 commit 8b6940b
Show file tree
Hide file tree
Showing 339 changed files with 11,118 additions and 6,444 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ jobs:
--health-retries 5
steps:
- name: Debug
run: echo ${{ github.ref_name }}
- name: Checkout
uses: actions/checkout@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version-file: './e2e/.nvmrc'
node-version-file: "./e2e/.nvmrc"
- name: Install pnpm
id: pnpm-install
uses: pnpm/action-setup@v2
Expand Down
89 changes: 84 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,93 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max

release:
runs-on: [self-hosted, Linux]
create-release:
name: create-release
runs-on: self-hosted
outputs:
upload_url: ${{ steps.release.outputs.upload_url }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Create release
- name: Create GitHub release
id: release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
generate_release_notes: true

build-binaries:
needs: [ "create-release" ]
runs-on:
- self-hosted
- ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
build: [ linux, linux-arm, linux-arm64, freebsd ]
include:
- build: linux
os: Linux
target: x86_64-unknown-linux-gnu
- build: linux-arm
os: Linux
target: armv7-unknown-linux-gnueabihf
- build: linux-arm64
os: Linux
target: aarch64-unknown-linux-gnu
- build: freebsd
os: Linux
target: x86_64-unknown-freebsd
steps:
# Store the version, stripping any v-prefix
- name: Write release version
run: |
VERSION=${GITHUB_REF_NAME#v}
echo Version: $VERSION
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
override: true

- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v3
with:
config-inline: |
[registry."docker.io"]
mirrors = ["dockerhub-proxy.teonite.net"]
- name: Build release binary
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --locked --release --target ${{ matrix.target }}

- name: Rename binary
run: mv target/${{ matrix.target }}/release/defguard defguard-${{ github.ref_name }}-${{ matrix.target }}

- name: Tar
uses: a7ul/[email protected]
with:
command: c
files: |
defguard-${{ github.ref_name }}-${{ matrix.target }}
outPath: defguard-${{ github.ref_name }}-${{ matrix.target }}.tar.gz

- name: Upload release archive
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: defguard-${{ github.ref_name }}-${{ matrix.target }}.tar.gz
asset_name: defguard-${{ github.ref_name }}-${{ matrix.target }}.tar.gz
asset_content_type: application/octet-stream

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

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

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

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

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

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

Loading

0 comments on commit 8b6940b

Please sign in to comment.