-
Notifications
You must be signed in to change notification settings - Fork 9
75 lines (70 loc) · 2.38 KB
/
build-deb.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Build and Release Package
on: [push]
env:
MAINTAINER_NAME: "Andriel Nuernberg"
MAINTAINER_EMAIL: "andrielfn@gmail.com"
GITHUB_USERNAME: "andrielfn"
VERSION: "0.0.1"
jobs:
build:
name: Build
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Build package
uses: ./.github/actions/build-deb
env:
MAINTAINER_NAME: ${{ env.MAINTAINER_NAME }}
MAINTAINER_EMAIL: ${{ env.MAINTAINER_EMAIL }}
GITHUB_USERNAME: ${{ env.GITHUB_USERNAME }}
VERSION: ${{ env.VERSION }}
- name: Upload package
uses: actions/upload-artifact@v3
with:
name: postgresql-ulid-deb
path: ./*.deb
# test:
# name: Test
# needs: build
# runs-on: ubuntu-22.04
# steps:
# - name: Download package
# uses: actions/download-artifact@v3
# with:
# name: postgresql-ulid-deb
# - name: Install PostgreSQL 16
# run: |
# sudo sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
# curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg
# sudo apt-get update
# sudo apt-get install -y postgresql-16 postgresql-contrib-16
# - name: Start PostgreSQL service
# run: |
# sudo systemctl start postgresql
# sudo systemctl status postgresql
# - name: Install package
# run: |
# sudo dpkg -i *.deb
# sudo apt-get install -f
# - name: Test PostgreSQL extension
# run: |
# sudo -u postgres psql -c "CREATE EXTENSION ulid;"
# sudo -u postgres psql -c "SELECT gen_ulid();"
# sudo -u postgres psql -c "SELECT '01H55TNAQ96WPSWE6WZRCH9G0C'::ulid::timestamp;"
# release:
# name: Create Release
# needs: [build, test]
# runs-on: ubuntu-22.04
# steps:
# - name: Download package
# uses: actions/download-artifact@v3
# with:
# name: postgresql-ulid-deb
# - name: Create Release
# uses: ncipollo/release-action@v1
# with:
# artifacts: "postgresql-ulid_${{ env.VERSION }}_amd64.deb"
# name: Release ${{ env.VERSION }}
# tag: ${{ env.VERSION }}
# draft: false
# prerelease: false