Skip to content

Commit

Permalink
Upgrade the version of the actions library.
Browse files Browse the repository at this point in the history
  • Loading branch information
fscarmen committed Mar 23, 2023
1 parent c391431 commit 3cbe848
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/glibc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
container: docker.io/centos:7
steps:
- uses: actions/checkout@v3.3.0
- uses: actions/checkout@v3.4.0

- name: Install dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync_warp-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
REPO: ${{ secrets.GH_REPO }}

steps:
- uses: actions/checkout@v3.3.0
- uses: actions/checkout@v3.4.0
- name: Update warp-go to latest version
run: |
NOW=$(wget -qO- https://raw.githubusercontent.com/${{ env.USERNAME }}/${{ env.REPO }}/main/warp-go.sh | grep 'latest=${latest' | cut -d \' -f2)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync_wgcf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
EMAIL: ${{ secrets.GH_EMAIL }}

steps:
- uses: actions/checkout@v3.3.0
- uses: actions/checkout@v3.4.0
- name: Update wgcf to latest version
run: |
NOW=$(wget -qO- https://raw.githubusercontent.com/${{ env.USERNAME }}/warp/main/menu.sh | grep 'latest=${latest' | cut -d \' -f2)
Expand Down
28 changes: 11 additions & 17 deletions .github/workflows/sync_wireguard-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,35 +27,30 @@ jobs:
run: |
NOW=$(wget -qO- "https://api.github.com/repos/${{ env.USERNAME }}/warp/releases" | grep "tag_name" | grep -i "wireguard-go" | head -n 1 | sed "s/.*_v\(.*\)\".*/\1/g")
LATEST=$(wget -qO- https://git.zx2c4.com/wireguard-go/ | grep '/wireguard-go/tag' | sed -n 1p | sed "s/.*>\([0-9.]\{1,\}\)<.*/\1/g")
NOW1=$(echo $NOW | cut -d \. -f1)
NOW2=$(echo $NOW | cut -d \. -f2)
NOW3=$(echo $NOW | cut -d \. -f3)
LATEST1=$(echo $LATEST | cut -d \. -f1)
LATEST2=$(echo $LATEST | cut -d \. -f2)
LATEST3=$(echo $LATEST | cut -d \. -f3)
NOW_VERSION=$(( NOW1*1000000 + NOW2*1000 + NOW3 ))
LATEST_VERSION=$(( LATEST1*1000000 + LATEST2*1000 + LATEST3 ))
if [ $LATEST_VERSION -gt $NOW_VERSION ]; then
if [ "$LATEST" != "$NOW" ]; then
git clone https://git.zx2c4.com/wireguard-go ${{ env.WORKDIR }}
cp ./.github/wireguard-go-releaser.yml ${{ env.WORKDIR }}/.goreleaser.yml
cp .github/wireguard-go-releaser.yml ${{ env.WORKDIR }}/.goreleaser.yml
echo "VERSION=$LATEST" >> $GITHUB_ENV
echo "flags=--snapshot" >> $GITHUB_ENV
fi
- name: Set up GoReleaser
uses: actions/setup-go@v4
uses: actions/setup-go@v4.0.0
if: ${{ env.VERSION != '' }}
with:
go-version: "1.18"
go-version: "1.20"

- name: Cross compile WireGuard-go
uses: goreleaser/goreleaser-action@v4
uses: goreleaser/goreleaser-action@v4.2.0
if: ${{ env.VERSION != '' }}
with:
distribution: goreleaser
workdir: ${{ env.WORKDIR }}
version: latest
args: release --rm-dist
args: release --clean ${{ env.flags }}
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

- name: Release binaries
uses: softprops/action-gh-release@v1
Expand All @@ -68,10 +63,9 @@ jobs:
if: ${{ env.VERSION != '' }}
run: |
cp -f ${{ env.WORKDIR }}/dist/*.tar.gz ${GITHUB_WORKSPACE}/wireguard-go/
wget -O ${GITHUB_WORKSPACE}/wireguard-go/wireguard-go_linux_amd64.tar.gz https://github.com/fscarmen/warp/releases/download/WireGuard-go_v0.0.20201118/wireguard-go_linux_amd64.tar.gz
rm -rf ${{ env.WORKDIR }}
git config --global user.email "${{ env.EMAIL }}"
git config --global user.name "${{ env.USERNAME }}"
git add .
git commit -m "AMD64 V0.0.20201118 and others V${{ env.VERSION }}, $(date "+%Y/%m/%d")"
git push
git commit -m "Wireguard-go V${{ env.VERSION }}, $(date "+%Y/%m/%d")"
git push
2 changes: 1 addition & 1 deletion .github/workflows/sync_wireproxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
EMAIL: ${{ secrets.GH_EMAIL }}

steps:
- uses: actions/checkout@v3.3.0
- uses: actions/checkout@v3.4.0
- name: Update wireproxy to latest version
run: |
NOW=$(wget -qO- https://raw.githubusercontent.com/${{ env.USERNAME }}/warp/main/wireproxy/version_history | head -n 1 | sed "s/.*v\(.*\)/\1/g")
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/wireguard-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3.3.0
uses: actions/checkout@v3.4.0
with:
fetch-depth: 0

Expand All @@ -25,17 +25,17 @@ jobs:
cp ./.github/wireguard-go-releaser.yml ${{ env.workdir }}/.goreleaser.yml
- name: Set up GoReleaser
uses: actions/setup-go@v4
uses: actions/setup-go@v4.0.0
with:
go-version: "1.18"
go-version: "1.20"

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
uses: goreleaser/goreleaser-action@v4.2.0
with:
distribution: goreleaser
workdir: ${{ env.workdir }}
version: latest
args: release --rm-dist
args: release --clean

- name: Release binaries
uses: softprops/action-gh-release@v1
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/wireguard-go_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3.3.0
uses: actions/checkout@v3.4.0
with:
fetch-depth: 0

Expand All @@ -30,17 +30,17 @@ jobs:
ls ${{ env.workdir }}
- name: Set up GoReleaser
uses: actions/setup-go@v4
uses: actions/setup-go@v4.0.0
with:
go-version: "1.18"

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
uses: goreleaser/goreleaser-action@v4.2.0
with:
distribution: goreleaser
workdir: ${{ env.workdir }}
version: latest
args: release --rm-dist
args: release --clean

- name: Release binaries
uses: softprops/action-gh-release@v1
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/wireproxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3.3.0
uses: actions/checkout@v3.4.0
with:
fetch-depth: 0

Expand All @@ -28,17 +28,17 @@ jobs:
git clone https://github.com/octeep/wireproxy.git ${{ env.workdir }}
cp ./.github/wireproxy-releaser.yml ${{ env.workdir }}/.goreleaser.yml
- name: Set up GoReleaser
uses: actions/setup-go@v4
uses: actions/setup-go@v4.0.0
with:
go-version: "1.18"

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
uses: goreleaser/goreleaser-action@v4.2.0
with:
distribution: goreleaser
workdir: ${{ env.workdir }}
version: latest
args: release --rm-dist
args: release --clean

- name: Release binaries
uses: softprops/action-gh-release@v1
Expand Down

0 comments on commit 3cbe848

Please sign in to comment.