ci(linux): wip for aur and snap [skip ci]

This commit is contained in:
Baptiste Augrain
2024-02-25 17:34:30 +01:00
parent 9c56656f21
commit 9eab456963
7 changed files with 127 additions and 174 deletions

View File

@@ -99,6 +99,8 @@ jobs:
run: ./get_repo.sh
- name: Build
env:
SHOULD_BUILD_REH: 'no'
run: ./build.sh
- name: Compress vscode artifact
@@ -289,7 +291,7 @@ jobs:
include:
- package_name: vscodium-insiders-bin
- package_name: vscodium-insiders
if: needs.check.outputs.SHOULD_DEPLOY == 'yes'
if: needs.check.outputs.SHOULD_DEPLOY == 'yes' && github.event.inputs.generate_assets != 'true'
steps:
- name: Get version
@@ -305,66 +307,3 @@ jobs:
aur_private_key: ${{ secrets.AUR_PRIVATE_KEY }}
aur_username: ${{ secrets.AUR_USERNAME }}
aur_email: ${{ secrets.AUR_EMAIL }}
snap:
needs:
- check
- build
runs-on: ubuntu-latest
env:
RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }}
strategy:
fail-fast: false
matrix:
platform:
- amd64
- arm64
# if: needs.check.outputs.SHOULD_DEPLOY == 'yes'
if: false
steps:
- uses: actions/checkout@v3
with:
ref: ${{ env.GITHUB_BRANCH }}
- name: Check version
env:
ARCHITECTURE: ${{ matrix.platform }}
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_STORE_LOGIN }}
run: ./stores/snapcraft/check_version.sh
- uses: docker/setup-qemu-action@v3
if: env.SHOULD_BUILD == 'yes'
- name: Prepare snapcraft.yaml
env:
ARCHITECTURE: ${{ matrix.platform }}
run: ./stores/snapcraft/build.sh
if: env.SHOULD_BUILD == 'yes'
# - uses: diddlesnaps/snapcraft-multiarch-action@v1
# with:
# path: stores/snapcraft/build
# architecture: ${{ matrix.platform }}
# id: build
# if: env.SHOULD_BUILD == 'yes'
- uses: snapcore/action-build@v1
with:
path: stores/snapcraft/build
id: build
if: env.SHOULD_BUILD == 'yes'
# - uses: diddlesnaps/snapcraft-review-action@v1
# with:
# snap: ${{ steps.build.outputs.snap }}
# isClassic: 'true'
# if: env.SHOULD_BUILD == 'yes'
- uses: svenstaro/upload-release-action@v2
with:
repo_name: ${{ env.ASSETS_REPOSITORY }}
repo_token: ${{ secrets.STRONGER_GITHUB_TOKEN }}
file: ${{ steps.build.outputs.snap }}
tag: ${{ env.RELEASE_VERSION }}
if: env.SHOULD_DEPLOY_TO_RELEASE == 'yes'

View File

@@ -103,6 +103,8 @@ jobs:
run: ./get_repo.sh
- name: Build
env:
SHOULD_BUILD_REH: 'no'
run: ./build.sh
- name: Compress vscode artifact
@@ -320,8 +322,7 @@ jobs:
platform:
- amd64
- arm64
# if: needs.build.outputs.SHOULD_DEPLOY == 'yes'
if: false
if: needs.build.outputs.SHOULD_DEPLOY == 'yes' && github.event.inputs.generate_assets != 'true'
steps:
- uses: actions/checkout@v3
@@ -329,16 +330,11 @@ jobs:
- name: Check version
env:
ARCHITECTURE: ${{ matrix.platform }}
GENERATE_ASSETS: ${{ github.event.inputs.generate_assets }}
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_STORE_LOGIN }}
run: ./stores/snapcraft/check_version.sh
- uses: docker/setup-qemu-action@v3
if: env.SHOULD_DEPLOY == 'yes'
- name: Prepare snapcraft.yaml
env:
ARCHITECTURE: ${{ matrix.platform }}
run: ./stores/snapcraft/build.sh
if: env.SHOULD_BUILD == 'yes'
- uses: diddlesnaps/snapcraft-multiarch-action@v1
@@ -370,6 +366,14 @@ jobs:
release: stable
if: env.SHOULD_DEPLOY_TO_STORE == 'yes'
- name: Upload assets
uses: actions/upload-artifact@v3
with:
name: snap-${{ matrix.platform }}
path: ${{ steps.build.outputs.snap }}
retention-days: 3
if: github.event.inputs.generate_assets == 'true'
deb-rpm-repo-hook:
needs:
- check