ci(release): add make install
Some checks failed
Create Release / changelog (push) Failing after 2m0s
Some checks failed
Create Release / changelog (push) Failing after 2m0s
This commit is contained in:
@ -47,9 +47,13 @@ jobs:
|
||||
echo "Version - $version"
|
||||
echo "VERSION=$version" >> $GITHUB_ENV
|
||||
|
||||
- name: Build alr binary
|
||||
- name: Prepare for install
|
||||
run: |
|
||||
CGO_ENABLED=0 go build -ldflags "-X gitea.plemya-x.ru/Plemya-x/ALR/internal/config.Version=${{ env.VERSION }}" -o alr
|
||||
apt-get update && apt-get install -y libcap2-bin
|
||||
|
||||
- name: Build alr
|
||||
run: |
|
||||
make build
|
||||
|
||||
- name: Create tar.gz
|
||||
run: |
|
||||
@ -67,30 +71,35 @@ jobs:
|
||||
files: |-
|
||||
alr-${{ env.VERSION }}-linux-x86_64.tar.gz
|
||||
|
||||
- name: Clone alr-default repository
|
||||
run: |
|
||||
git clone https://gitea:${{ secrets.GITEAPUBLIC }}@gitea.plemya-x.ru/Plemya-x/alr-default.git /tmp/alr-default
|
||||
- name: Checkout alr-default repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: Plemya-x/alr-default
|
||||
token: ${{ secrets.GITEAPUBLIC }}
|
||||
path: alr-default
|
||||
|
||||
- name: Update version in alr-bin
|
||||
run: |
|
||||
# Замените значения в файле с конфигурацией
|
||||
sed -i "s/version='[0-9]\+\.[0-9]\+\.[0-9]\+'/version='${{ env.VERSION }}'/g" /tmp/alr-default/alr-bin/alr.sh
|
||||
sed -i "s/release='[0-9]\+'/release='1'/g" /tmp/alr-default/alr-bin/alr.sh
|
||||
sed -i "s/version='[0-9]\+\.[0-9]\+\.[0-9]\+'/version='${{ env.VERSION }}'/g" alr-default/alr-bin/alr.sh
|
||||
sed -i "s/release='[0-9]\+'/release='1'/g" alr-default/alr-bin/alr.sh
|
||||
|
||||
- name: Commit changes
|
||||
run: |
|
||||
cd /tmp/alr-default
|
||||
cd alr-default
|
||||
git config user.name "gitea"
|
||||
git config user.email "admin@plemya-x.ru"
|
||||
git remote set-url origin https://gitea:${{ secrets.GITEAPUBLIC }}@gitea.plemya-x.ru/Plemya-x/alr-default.git
|
||||
git remote -v
|
||||
git add .
|
||||
git commit -m "Обновление версии до ${{ env.VERSION }}"
|
||||
git push origin master
|
||||
git push
|
||||
|
||||
- name: Install alr
|
||||
run: |
|
||||
make install
|
||||
|
||||
- name: Build packages
|
||||
run: |
|
||||
SCRIPT_PATH=/tmp/alr-default/alr-bin/alr.sh
|
||||
SCRIPT_PATH=alr-default/alr-bin/alr.sh
|
||||
ALR_DISTRO=altlinux ALR_PKG_FORMAT=rpm alr build -s "$SCRIPT_PATH"
|
||||
ALR_PKG_FORMAT=rpm alr build -s "$SCRIPT_PATH"
|
||||
ALR_PKG_FORMAT=deb alr build -s "$SCRIPT_PATH"
|
||||
|
Reference in New Issue
Block a user