simplify task && set env var VERSION from jobs.validate.outputs.version
This commit is contained in:
@@ -58,9 +58,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Set version to env vars
|
- name: Set version to env vars
|
||||||
run: |
|
run: |
|
||||||
echo "VERSION=`cat .version`" >> $GITHUB_ENV
|
echo "VERSION="${{ needs.validate.outputs.version }} >> $GITHUB_ENV
|
||||||
echo "version: $VERSION"
|
echo "version: $VERSION"
|
||||||
echo "${{ needs.validate.outputs.version }}"
|
|
||||||
|
|
||||||
- name: Setup go
|
- name: Setup go
|
||||||
uses: actions/setup-go@v4
|
uses: actions/setup-go@v4
|
||||||
@@ -90,25 +89,25 @@ jobs:
|
|||||||
echo "Maintainer: Ludovic Cartier <ludovic.cartier@alterway.fr>" >> varnish-exporter-amd64/DEBIAN/control
|
echo "Maintainer: Ludovic Cartier <ludovic.cartier@alterway.fr>" >> varnish-exporter-amd64/DEBIAN/control
|
||||||
echo "Architecture: amd64" >> varnish-exporter-amd64/DEBIAN/control
|
echo "Architecture: amd64" >> varnish-exporter-amd64/DEBIAN/control
|
||||||
echo "Homepage: https://git.brainsys.io/packages/prometheus-exporters" >> varnish-exporter-amd64/DEBIAN/control
|
echo "Homepage: https://git.brainsys.io/packages/prometheus-exporters" >> varnish-exporter-amd64/DEBIAN/control
|
||||||
echo "Description: Prometheus Exporters package for GNU/Linux Debian" >> varnish-exporter-amd64/DEBIAN/control
|
echo "Description: Prometheus Varnish Exporter package for GNU/Linux Debian" >> varnish-exporter-amd64/DEBIAN/control
|
||||||
|
|
||||||
- name: Build deb files
|
- name: Build deb files
|
||||||
run: |
|
run: |
|
||||||
dpkg -b varnish-exporter-amd64 bin/prometheus-varnish-exporter-amd64.deb
|
dpkg -b varnish-exporter-amd64 bin/prometheus-varnish-exporter_$VERSION-1_amd64.deb
|
||||||
|
|
||||||
- name: Prepare apt repo upload
|
# - name: Prepare apt repo upload
|
||||||
run: |
|
# run: |
|
||||||
mv bin/prometheus-varnish-exporter-amd64.deb prometheus-varnish-exporter_$VERSION-1_amd64.deb
|
# mv bin/prometheus-varnish-exporter-amd64.deb bin/prometheus-varnish-exporter_$VERSION-1_amd64.deb
|
||||||
|
|
||||||
- name: Release packages
|
- name: Release packages
|
||||||
run: |
|
run: |
|
||||||
curl -s -u "${{ secrets.PACKAGE_TOKEN }}" --upload-file prometheus-varnish-exporter_$VERSION-1_amd64.deb \
|
curl -s -u "${{ secrets.PACKAGE_TOKEN }}" --upload-file bin/prometheus-varnish-exporter_$VERSION-1_amd64.deb \
|
||||||
https://git.brainsys.io/api/packages/packages/debian/pool/stable/main/upload
|
https://git.brainsys.io/api/packages/packages/debian/pool/stable/main/upload
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
uses: akkuman/gitea-release-action@v1
|
uses: akkuman/gitea-release-action@v1
|
||||||
with:
|
with:
|
||||||
tag_name: "${{ needs.validate.outputs.version }}"
|
tag_name: "$VERSION"
|
||||||
files: |-
|
files: |-
|
||||||
bin/**
|
bin/**
|
||||||
token: "${{ secrets.RELEASE_TOKEN }}"
|
token: "${{ secrets.RELEASE_TOKEN }}"
|
||||||
|
Reference in New Issue
Block a user