Skip to content

Commit

Permalink
ci: update github action
Browse files Browse the repository at this point in the history
  • Loading branch information
fengyc committed Jul 20, 2024
1 parent 766c4c3 commit bb243c5
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 16 deletions.
31 changes: 31 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/rust
{
"name": "Rust",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/rust:1-1-bullseye"

// Use 'mounts' to make the cargo cache persistent in a Docker Volume.
// "mounts": [
// {
// "source": "devcontainer-cargo-cache-${devcontainerId}",
// "target": "/usr/local/cargo",
// "type": "volume"
// }
// ]

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "rustc --version",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for more information:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
# https://containers.dev/guide/dependabot

version: 2
updates:
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: weekly
13 changes: 5 additions & 8 deletions .github/workflows/build-gnu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,9 @@ jobs:
with:
name: gnu-${{ matrix.target }}
path: |
target
!target/release
!target/**/.fingerprint
!target/**/*.d
!target/**/build
!target/**/deps
!target/**/examples
!target/**/incremental
target/**/*.deb
target/**/*.rpm
target/**/pisugar-server
target/**/pisugar-poweroff
target/**/pisugar-programmer
if-no-files-found: warn
15 changes: 7 additions & 8 deletions .github/workflows/build-musl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,14 @@ jobs:
# Upload artifact
- name: Upload artifact
uses: actions/upload-artifact@v3
env:
target: ${{ matrix.target }}
with:
name: musl-${{ matrix.target }}
path: |
target
!target/release
!target/**/.fingerprint
!target/**/*.d
!target/**/build
!target/**/deps
!target/**/examples
!target/**/incremental
target/**/*.deb
target/**/*.rpm
target/**/pisugar-server
target/**/pisugar-poweroff
target/**/pisugar-programmer
if-no-files-found: warn
9 changes: 9 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ jobs:
with:
name: pisugar-all

- name: Create archives
run: |
mkdir -p archives
cp -R target/* archives/
cp scripts/*.sh archives/
cp scripts/aur/*.tar.gz archives/
tar -czf archives.tar.gz archives
# Development Release
- uses: "marvinpinto/action-automatic-releases@latest"
with:
Expand All @@ -57,6 +65,7 @@ jobs:
prerelease: true
draft: false
files: |
archives.tar.gz
target/**/*.deb
target/**/*.rpm
scripts/*.sh
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,21 @@ jobs:
with:
name: pisugar-all

- name: Create archives
run: |
mkdir -p archives
cp -R target/* archives/
cp scripts/*.sh archives/
cp scripts/aur/*.tar.gz archives/
tar -czf archives.tar.gz archives
# Upload artifact
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: pisugar-artifacts
path: |
archives.tar.gz
target/**/*.deb
target/**/*.rpm
scripts/*.sh
Expand Down

0 comments on commit bb243c5

Please sign in to comment.